on 01-06-2011 12:47 PM
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.
Hi,
Something must be wrong when you post invoice. What is your B1 version and PL?
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.