API Document Package Items / Delete
Delete Method


Deletes the current line.

Returns a result value that indicates success or failure.


Visual Basic
Public Sub Delete() 


Deleting an object (Visual Basic)
Dim oOrder As SAPbobsCOM.Documents ' Order object Dim lRetCode As Integer ' Return Code ' New Order oOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders) ' Fill Order details oOrder.CardCode = "C40000" oOrder.CardName = "Earthshaker Corporation" oOrder.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO oOrder.DocDate = Today() oOrder.DocDueDate = Today() oOrder.DocCurrency = "USD" 'Fill 2 lines in the order oOrder.Lines.ItemCode = "A00001" oOrder.Lines.ItemDescription = "IBM Inforprint 1312" oOrder.Lines.Quantity = 1 oOrder.Lines.Price = 380 oOrder.Lines.TaxCode = "0" oOrder.Lines.LineTotal = 380 oOrder.Lines.Add() oOrder.Lines.ItemCode = "A00002" oOrder.Lines.ItemDescription = "IBM Infoprint 1222" oOrder.Lines.Quantity = 1 oOrder.Lines.Price = 380 oOrder.Lines.TaxCode = "0" oOrder.Lines.LineTotal = 380 ' Now we want to delete the second line in the Order oOrder.Lines.Delete() ' The Order will be added without the second line lRetCode = oOrder.Add

See Also

Related information

Document Package Items DocumentPackageItems Object
A data structure holding the properties of items in a package. Access this structure via DocumentPackages.Items. Source table: DLN8.
   Parent: Document Packages DocumentPackages Object

SAP® Business One is the trademark(s) or registered trademark(s) of SAP AG in Germany and in several other countries. Contact
This website is not affiliated with, maintained, authorized, endorsed or sponsored by SAP AG or any of its affiliates