Share via


InventAvailabilityProvider::findSameBatchFirstOrLargest Method [AX 2012]

Gets an InventAvailabilityByUnitWithDim object for the same batch inventory that is first that meets the requirements or largest available for automatic reservation, depending on parameter settings.

Syntax

client server public static InventAvailabilityByUnitWithDim findSameBatchFirstOrLargest(
    InventMovement _inventMovement, 
    InventDim _inventDimCriteria, 
   [InventDimParm _inventDimParm, 
    InventQty _requestedQty, 
    PdsCWInventQty _cwRequestedQty])

Run On

Called

Parameters

  • _inventMovement
    Type: InventMovement Class
    The InventMovement object for which the automatic reservation is attempted.
  • _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: InventAvailabilityByUnitWithDim Class
An InventAvailabilityByUnitWithDim object 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.

See Also

Reference

InventAvailabilityProvider Class