How exactly can you make any marketing document except for A/R Invoice utilizing the DI API that also has a special line: Text or Subtotal? The consequence of the same is that in the tenth table XXX10 of the document, for instance RDR10 for Sales Order, the value stated in the field Object Type will certainly be 13 in spite of the applicable object type like 17 for Sales Orders. When you attempt to update through SAP Business One application two different documents like Invoice and Sales Quotation that have the same document entry, it has to be noted that the first doc is updated without any difficulty but the for the second one an error message appears: This Entry already exists in the following table (AD10) because the key is already present in the AD10 table with the same object kind (13).
Set oDoc = oCompany.GetBusinessObject(oOrders)
oDoc.CardCode = "Cus_1"
oDoc.DocDueDate = DateTime.Now
oDoc.Lines.ItemCode = "A1000"
oDoc.SpecialLines.LineType = dslt_Text
oDoc.SpecialLines.LineText = "DI"
oDoc.SpecialLines.AfterLineNumber = 0
oDoc.Comments = "Added via DI"