Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The InventOnHandCriteria class is the base class for inventory on hand criteria classes.
Syntax
class InventOnHandCriteria
Run On
Called
Methods
Method | Description | |
---|---|---|
![]() |
affectedDimensions | Gets the list of inventory dimensions that the on hand query should be filtered by. |
![]() |
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. |
![]() |
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. |
![]() |
calcMustBeApplied | Determines if the particular on hand criteria must be applied. |
![]() |
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
![]() |
doApplyToOnHandQuery | Performs filter specific logic of adding filters to the specified on hand query. |
![]() |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
![]() |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
![]() |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
![]() |
isMatchedByInventDim | Gets a value indicating if the specified inventory dimensions are matched by the requirements of this criteria. |
![]() |
mergeMatchingRecords | Merges all the records that match this criteria. |
![]() |
mustBeApplied | Determines if the on hand criteria must be applied. |
![]() |
mustBeAppliedToQuery | Gets a value indicating whether the criteria must be applied to the specified query. |
![]() |
new | Initializes a new instance of the Object class. (Inherited from Object.) |
![]() |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
![]() |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
![]() |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
![]() |
owner | Returns the instance that owns the object. (Inherited from Object.) |
![]() |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
![]() |
toString | Returns a string that represents the current object. (Inherited from Object.) |
![]() |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
![]() |
wait | Pauses a process. (Inherited from Object.) |
![]() |
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