Skip to Content
0
Jan 12, 2023 at 03:07 PM

How to create approved document from approved draft via SDK

149 Views Last edit Jan 12, 2023 at 04:20 PM 2 rev

Hi experts,

I've tried sample code like this;

SAPbobsCOM.Documents oDocDraft = SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts);<br>oDocDraft.GetByKey(docEntry);<br>oDocDraft.SaveDraftToDocument();

but this only creates regular document(doesn't have any information about approval status).

Also it does not generate process history on linked tables(ordr,owdd,wdd1) when the draft created via SDK

image.png

Is it possible to create approved document via SDK? If so I need an example about how to achieve that(c# code preferably). Any help would be much appreciated.

Attachments

image.png (102.7 kB)