📚 SAP Business One SDK Help

GetByKeyDiscounts Method
See Also  Example
ItemCode

The key of the item whose discounts are to be retrieved. This is a foreign key to the Items object.

PriceListNum
The key of the price list whose discounts are to be retrieved. This is a foreign key to the PriceLists object.

Description

Retrieves the discounts for a specific item that apply to all business partners.

To retrieve discounts for a specific business partner, use the GetByKey method. 

Syntax

Visual Basic
Public Function GetByKeyDiscounts( _
   ByVal ItemCode As String, _
   ByVal PriceListNum As Long _
) As Boolean

Parameters

ItemCode

The key of the item whose discounts are to be retrieved. This is a foreign key to the Items object.

PriceListNum
The key of the price list whose discounts are to be retrieved. This is a foreign key to the PriceLists object.

Example

Getting a special price (for all business partners) (Visual Basic)Copy Code
Dim oSppDel As SAPbobsCOM.SpecialPrices
oSppDel = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oSpecialPrices)
Dim bret As Boolean = oSppDel.GetByKeyDiscounts("I0001", "Code1")

See Also