Hello.
I'm working on data exportation from our product to SAP Buisness One using SAPBuisnessOneSDK.dll.
I try to export ARInvoice, APInvoice, SalesOrder and PurchaseOrder.
I can fill header fields and ItemLines for these types of documents but I still don't know how to add service items for service table.
Hope you can give me some advice how to insert service lines to service table or probably you can provide some examples of adding new lines to this table.
Waiting for the answer.
Hi Alex,
If a document will be compose by service or item is a property on Documents object called DocType. After you set up your document for service type, you only need add your services. Below a sample with basically the minimum properties that you need fill.
Documents oDoc = oCompany.GetBusinessObject(BoObjectTypes.oInvoices); oDoc.CardCode = "C00000001"; oDoc.DocDueDate = DateTime.Now; oDoc.DocType = BoDocumentTypes.dDocument_Service; oDoc.Lines.ItemDescription = "Test"; oDoc.Lines.AccountCode = "5.01.02.05.39"; oDoc.Lines.LineTotal = 100.00; if (oDoc.Add() != 0) MessageBox.Show(oCompany.GetLastErrorDescription());
Hope it helps.
Kind Regards,
Diego Lother
Thank you. This worked for me.
I must admit that I had to fill TaxCode property like this:
oDoc.Lines.TaxCode = "NY";
Is it possible for the document to have both service and item tables?
Hi Alex,
No. The document have only one type service or item.
What you can do is create items with service type and use then with itens of materials type in the documents.
Kind Regards,
Diego Lother