InventAvailabilityProvider::findSameBatchFirstOrLargestPackedServer Method [AX 2012]
Gets a packed InventAvailabilityByUnitWithDim on the server for the same batch inventory that is first that meets the requirements or largest available for reservation, depending on parameter settings.
Syntax
server private static container findSameBatchFirstOrLargestPackedServer(
Common _inventMovementBuffer,
InventDim _inventDimCriteria,
InventDimParm _inventDimParm,
InventQty _requestedQty,
PdsCWInventQty _cwRequestedQty)
Run On
Server
Parameters
- _inventMovementBuffer
Type: Common Table
The record that is used as the inventory movement buffer. E.g. SalesLine.
- _inventDimCriteria
Type: InventDim Table
The criteria to limit the batch search to.
- _inventDimParm
Type: InventDimParm Table
The flags for the inventory dimension criteria values.
- _requestedQty
Type: InventQty Extended Data Type
The required minimum inventory quantity that a batch must have; optional. If specified this method will search for a batch that has at least this inventory quantity available.
- _cwRequestedQty
Type: PdsCWInventQty Extended Data Type
The required minimum catch weight quantity that a batch must have; optional. If specified this method will search for a batch that has at least this catch weight quantity available.
Return Value
Type: container
A container containing a packed InventAvailabilityByUnitWithDim found by the search. If there is no batch found with available inventory for reservation that is enough for the required quantity, then the largest available will be returned. If there is no inventory found matching the item and dimension criteria then the two record buffers will be empty.
Remarks
The selection of the actual batch depends on the reservation settings in the inventory model group (ReserveByDate and FEFO). If either of these are set, meaning date dependent reservation is selected; and if _requestedQty or _cwRequestedQty are either non-zero, then the first batch that matches that requirement is returned. Otherwise, this will find the batch with the largest available inventory available for reservation that matches the given item and dimension selection parameters.