📚 SAP Business One SDK Help

Remove Method
See Also  Example

Description

Deletes a record from the object table.

Syntax

Visual Basic
Public Function Remove() As Long

Return Type

Returns a result value that indicates success or failure. If the method succeeds, it returns 0. Otherwise, it returns an error code.

You can retrieve the last error code and its description using the method GetLastError.

Remarks

You must use the GetByKey method to retrieve a valid object.

Example

Deleting a special price ()Copy Code
Dim oSppDel As SAPbobsCOM.SpecialPrices 
oSppDel = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSpecialPrices) 
Dim bret As Boolean = oSppDel.GetByKeyDiscounts("I0001", "Code1") 
Dim iInt As Integer = oSppDel.Remove()

Example

See Also