📚 SAP Business One SDK Help

Delete Method
See Also  Example
pIGeneralDataParams

Contains a property whose value is the key of the row to delete.

For example, for a UDO for a master data table, the object contains a property called Code whose value is the key of the row to delete.

Description

Deletes a row in the database table of the current UDO.

Syntax

Visual Basic
Public Sub Delete( _
   ByVal pIGeneralDataParams As GeneralDataParams _
) 

Parameters

pIGeneralDataParams

Contains a property whose value is the key of the row to delete.

For example, for a UDO for a master data table, the object contains a property called Code whose value is the key of the row to delete.

Example

Deleting a UDO record (Visual Basic)Copy Code
Dim oGeneralService As SAPbobsCOM.GeneralService
Dim oGeneralParams As SAPbobsCOM.GeneralDataParams

Dim sCmp As SAPbobsCOM.CompanyService
sCmp = oCompany.GetCompanyService

'Get a handle to the SM_MOR UDO
oGeneralService = sCmp.GetGeneralService("SM_MOR")

'Delete UDO record
oGeneralParams = oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams)
oGeneralParams.SetProperty("DocEntry", "2")
oGeneralService.Delete(oGeneralParams)

See Also