📚 SAP Business One SDK Help

Delete Method
See Also  Example

Description

Deletes the current line.

Returns a result value that indicates success or failure.

Syntax

Visual Basic
Public Sub Delete() 

Remarks

You cannot delete a line if it is the only line in the ProductTrees object.

Example

Deleting production trees line (C#)Copy Code
SAPbobsCOM.ProductTrees oProdTree; 
 
// Delete Product Tree 
if(oProdTree.GetByKey("ProdTree") == true) 

    oProdTree.Items.SetCurrentLine(1); 
    oProdTree.Items.Delete(); 
    oProdTree.Update(); 

See Also