📚 SAP Business One SDK Help

DeleteCashDiscount Method
See Also  Example
pICashDiscountParams
The key of the cash discount to be deleted.

Description

Deletes an existing cash discount.

The cash discount is specified by its key (Code), which is contained in the CashDiscountParams object passed to the method.

Syntax

Visual Basic
Public Sub DeleteCashDiscount( _
   ByVal pICashDiscountParams As CashDiscountParams _
) 

Parameters

pICashDiscountParams
The key of the cash discount to be deleted.

Remarks

Cash discounts that have been assigned to a payment term, via the PaymentTermsTypes object, cannot be deleted.

Example

Deleting a cash discount (C#)Copy Code
CashDiscountParams delLine; 
delLine = (CashDiscountParams)oCDCSrv.GetDataInterface(SAPbobsCOM.CashDiscountsServiceDataInterfaces.cdsCashDiscountParams); 
 
delLine.Code = "Code"; 
oCDCSrv.DeleteCashDiscount(delLine);

See Also