InventOnHandCriteria Class [AX 2012]

The InventOnHandCriteria class is the base class for inventory on hand criteria classes.

Syntax

class InventOnHandCriteria

Run On

Called

Methods

  Method Description
Dn514825.pubmethod(en-us,AX.60).gif affectedDimensions Gets the list of inventory dimensions that the on hand query should be filtered by.
Dn514825.pubmethod(en-us,AX.60).gif applyToOnHand Adds required filters to the on hand query to make sure that the query only selects those on hand records that match the criteria.
Dn514825.pubmethod(en-us,AX.60).gif applyToOnHandQuery Adds required filters to the on hand query to make sure that the query only selects those on hand records that match the criteria.
Dn514825.protmethod(en-us,AX.60).gif calcMustBeApplied Determines if the particular on hand criteria must be applied.
Dn514825.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Dn514825.protmethod(en-us,AX.60).gif doApplyToOnHandQuery Performs filter specific logic of adding filters to the specified on hand query.
Dn514825.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif isMatchedByInventDim Gets a value indicating if the specified inventory dimensions are matched by the requirements of this criteria.
Dn514825.pubmethod(en-us,AX.60).gif mergeMatchingRecords Merges all the records that match this criteria.
Dn514825.pubmethod(en-us,AX.60).gif mustBeApplied Determines if the on hand criteria must be applied.
Dn514825.pubmethod(en-us,AX.60).gif mustBeAppliedToQuery Gets a value indicating whether the criteria must be applied to the specified query.
Dn514825.pubmethod(en-us,AX.60).gif new Initializes a new instance of the Object class. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Dn514825.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)

Top

Remarks

In most cases a criteria should add the conditions to the query but the caller cannot rely on this behavior as a criteria implementation may filter records in X++ because of the complexity of the rules. Therefore, when you use implementations of this class to apply criteria to an on hand query, after you run the query, you must use either or when retrieving the results.

If you simply want to get a cummulative on hand record, then use , for example:query = InventSum::newQuery(null, inventDim, inventDimParm, null); inventOnHandCriteria.applyToOnHand(query); inventSum = inventOnHandCriteria.mergeMatchingRecords(query, tableNum(InventSum));

If you need to process each inventory record retrieved, then use , for example:query = InventSum::newQuery(null, inventDim, inventDimParm, inventDimParmGroupBy); inventOnHandCriteria.applyToOnHand(query); queryRun = new QueryRun(query); while (queryRun.next()) { inventDim = queryRun.get(tableNum(InventDim)); if (inventOnHandCriteria.isMatchedByInventDim(inventDim)) { ...logic here for processing each on hand record that matches the criteria... } }

Inheritance Hierarchy

Object Class
  InventOnHandCriteria Class
    InventOnHandCompositeCriteria Class
    InventOnHandSingleDimensionCriteria Class