📚 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 ProductionOrders object.

Example

Deleting production order line (C#)Copy Code
SAPbobsCOM.ProductionOrders oProdOrder; 
 
// Delete production order line 
if(oProdOrder.GetByKey(0) == true) 
{ 
    oProdOrder.Lines.SetCurrentLine(0); 
    oProdOrder.Lines.Delete(); 
    oProdOrder.Update(); 
}

See Also