📚 SAP Business One SDK Help

GetItemPrice Method
See Also 
CardCode
Specifies the business partner code.
ItemCode
Specifies the item code.
amount
Specifies transaction quantity (number of units).
Date
Specifies transaction date.

Description

Returns a Recordset object that contains the item price for specified business partner and item, based on the amount and transaction date.

See Get Item Price sample.

Syntax

Visual Basic
Public Function GetItemPrice( _
   ByVal CardCode As String, _
   ByVal ItemCode As String, _
   ByVal amount As Double, _
   ByVal Date As Date _
) As Recordset

Parameters

CardCode
Specifies the business partner code.
ItemCode
Specifies the item code.
amount
Specifies transaction quantity (number of units).
Date
Specifies transaction date.

Return Type

A Recordset object that contains two fields: Price and Currency.

The system returns 0, if a price is not found for the specified business partner and item.

Exceptions

-2000 The connection with database has been disconnected.

Remarks

The item price consists on the following four factors: business partner, item, transaction amount, and transaction date.

If the currency of the returned price is not the same currency as you use, use the GetCurrencyRate method to convert between currencies.

Example

See Also