EventContextInformation Class [AX 2012]
The EventContextInformation class packs and unpacks context information that is needed to drill down to a specific record in a form.
| Method | Description | |
|---|---|---|
| applyQueryRanges | Applies ranges to the various data sources in the context form. This is done by using the dynalinks between the data sources, by building and running a query where the alert buffer is the uppermost data source, and then by applying the retrieved values to the data source query ranges. |
| cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
| canUseFindRecord | Tests whether the FormDataSource.findRecord method can be used to find the alerted record in a form data source. |
| canUseLookup | Returns true if the lookupValue and lookupField properties of the Args class can be used when initializing the context form. |
| createFormRun | Creates the context form and returns a FormRun object. The FormRun.init method is called by the method. |
| createFormRunWithArgs | |
| createFormRunWithFormRef | |
| cutInfolog | |
| equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
| find | Uses the FormDataSource.findRecord method to find the alerted buffer in the form data source, but only if canUseFindRecord returns true. |
| findTimed | Calls FormDataSource.findRecord. It is called by using a timeout from the find method. |
| focusOnControlName | |
| getPrimaryIndex | |
| getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
| handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
| 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.) |
| pack | Serializes the current instance of the EventContextInformation class. |
| packFds | |
| parmAlertBuffer | Gets or sets the AlertBuffer parameter. |
| parmAlertFormDsName | Gets or sets the AlertFormDsName parameter. |
| parmDontUseFormRunFromMenuItem | Gets or sets the DontUseFormRunFromMenuItem parameter. |
| parmFormControlName | Gets or sets the FormControlName parameter. |
| parmFormRun | Gets or sets the FormRun parameter. |
| parmMenuItemName | Gets or sets the MenuItemName parameter. |
| parmMenuItemType | Gets or sets the MenuItemType parameter. |
| parmPackedArgs | Gets or sets the PackedArgs parameter. |
| setEventRuleId | Sets the internal eventRuleId. |
| setLookup | |
| 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.) |
| unpack | Deserializes the _packedFormRun parameter value to an instance of the EventContextInformation class. |
| unpackFds | |
| 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.) |
| ::construct | Initializes a new instance of the EventContextInformation class. |
| ::getFldIdsValues | Gets the field IDs and values from the records that are found when running a query using the record to be drilled down. |
The class also provides methods for accomplishing the drill down to the source of an event.
The context information necessary for opening up the drill-down form is packed and stored in the EventRuleData table at rule-creation time. At Alert Viewing time, it gets unpacked and passed to the drill-down form.
static void example(EventRuleId _ruleId, Common _alertBuffer)
{
EventContextInformation eventContextInformation;
Container c;
FormRun formRun;
// Packing
eventContextInformation = new EventContextInformation();
eventContextInformation.setEventRuleId(_ruleId);
c = eventContextInformation.pack();
// Unpacking
eventContextInformation.setEventRuleId(_ruleId);
eventContextInformation.parmAlertBuffer(_alertBuffer);
eventContextInformation.unpack(c);
formRun = eventContextInformation.createFormRun();
eventContextInformation.applyQueryRanges();
formrun.run();
eventContextInformation.find();
formrun.detach();
}
Community Additions
ADD
Show: