SalesPurchLine::priceDisc_LineDiscCache Method [AX 2012]

Instantiates the PriceDisc_LineDisc class.

server public static PriceDisc_LineDisc priceDisc_LineDiscCache(
    SalesPurchLine _salesPurchLine, 
   [InventDim _inventDim, 
    boolean _doCallPriceDate])

Run On



Type: SalesPurchLine Map
An instance of the SalesPurchLine table map.
Type: InventDim Table
A buffer of the InventDim table.
Type: boolean
A Boolean value that specifies whether to use the price date or the system date for the discount calculation.

Return Value

Type: PriceDisc_LineDisc Class
An instance of the PriceDisc_LineDisc class.

The instantiated PriceDisc_LineDisc class is stored in the global cache and first thing this method tries to retrieve it from there.After instantiation or retrieval is the PriceDisc_LineDisc class parameters updated and it is checked if the discount values still are valid.If the price discount determination values are outdated a recalculation is executed.