Description
Deletes an existing distribution rule.
The distribution rule is specified by its key (OcrCode), which is contained in the DistributionRuleParams object passed to the method.
Syntax
Parameters
Example
| Delet a distribution rule (Visual Basic) | Copy Code |
|---|
oCmpSrv = oCompany.GetCompanyService()
Dim oDLservice As SAPbobsCOM.DistributionRulesService = oCmpSrv.GetBusinessService(SAPbobsCOM.ServiceTypes.DistributionRulesService)
Dim oDL As SAPbobsCOM.DistributionRule
Dim oDLParams As SAPbobsCOM.IDistributionRuleParams
oDLParams = oDLservice.GetDataInterface(SAPbobsCOM.DistributionRulesServiceDataInterfaces.drsDistributionRuleParams)
oDLParams.FactorCode = "1"
Try
oDL = oDLservice.GetDistributionRule(oDLParams)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Try
oDLservice.DeleteDistributionRule(oDL)
Catch ex As Exception
MsgBox(ex.Message)
End Try |
|
See Also