cancel
Showing results for 
Search instead for 
Did you mean: 

Document Status

Former Member
0 Kudos

Hi Experts,

My addon is posting a Draft document to Delivery document and then Delivery to Invoice. After posting, my Delivery status becomes "Open-Printed" and my Invoice "Closed". Technically, my Delivery document should be "Closed" and my Invoice "Open" until such payment has not been applied to this Invoice. Please help..

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Something must be wrong when you post invoice. What is your B1 version and PL?

Thanks,

Gordon

Former Member
0 Kudos

SBO v8.8 PL13

if ypu dont mind, I'd also like to know if this line of code is possible:

=============================================

SBOGlobal.SboCompany.StartTransaction();

SAPbobsCOM.Documents oDraft = (SAPbobsCOM.Documents)SBOGlobal.SboCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts);

oDraft.GetByKey(205);

int result = oDraft.Add();

SBOGlobal.SboCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit);

=============================================

I am simply posting a Draft document directly to invoice. But the draft is still Draft document.

Edited by: Roger Arce on Jan 6, 2011 3:46 PM

Former Member
0 Kudos

Unfortunately all that code will do is post another draft document with the same details. You have to convert it into an invoice - there are two methods, just go through every property and copy the values or do it through XML. You can find some examples on how to do it with XML (I remember Janos put up a nice example before) & once you learn how to do it this way, it will save you alot o hassle!

For the issue with the delivery & invoice, I think we need to see your code to see how you are linking them