RetailPricingEngine::getActivePrice Method [AX 2012]
Gets the active retail channel price for a given sales line and customer.
This includes all the retail pricing logic, including channel price trade agreements, customer trade agreements, base price lookup, and retail price adjustments.
Basic flow is: 1. Try to find trade agreement price for customer 2. If none, try to find trade agreement price for channel 3. If none, use the item's base price 4. Use price found above and feed into retail price adjustment search.
This price is always less than or equal to the price found above
Note |
|---|
|
The syntax of this method varies based on the version of Microsoft Dynamics AX that you are using. |
Microsoft Dynamics AX 2012 R3
client server public static Price getActivePrice(
RecId _channelId,
SalesLine _salesLine,
SalesQty _quantity,
PriceGroupId _customerPriceGroup,
AccountNum _customerAccount,
utcdatetime _dateToCheck)
Microsoft Dynamics AX 2012 R2 (SYS)
client server private static Price getActivePrice(
RecId _channelId,
SalesLine _salesLine,
SalesQty _quantity,
PriceGroupId _customerPriceGroup,
AccountNum _customerAccount,
utcdatetime _dateToCheck)
Run On
CalledParameters
- _channelId
- Type: RecId Extended Data Type
The record Id of the channel where price is active.
- _salesLine
- Type: SalesLine Table
The sales line to find a price for.
- _quantity
- Type: SalesQty Extended Data Type
The quantity to consider. Overrides the line quantity because we need to consider transaction quantity.
- _customerPriceGroup
- Type: PriceGroupId Extended Data Type
Optional. The customer sales price group.
- _customerAccount
- Type: AccountNum Extended Data Type
Optional. The customer account number.
- _dateToCheck
- Type: utcdatetime
The date and time of the active price
Show:
Note