📚 SAP Business One SDK Help

Cancel Method
See Also  Example
pIGeneralDataParams

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

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 cancel.

Description

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

Syntax

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

Parameters

pIGeneralDataParams

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

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 cancel.

Example

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

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

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

See Also