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.

class EventContextInformation implements SysPackable

Run On

Called

  MethodDescription
Gg771018.pubmethod(en-us,AX.60).gif 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.
Gg771018.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg771018.privmethod(en-us,AX.60).gif canUseFindRecord Tests whether the FormDataSource.findRecord method can be used to find the alerted record in a form data source.
Gg771018.privmethod(en-us,AX.60).gif canUseLookup Returns true if the lookupValue and lookupField properties of the Args class can be used when initializing the context form.
Gg771018.pubmethod(en-us,AX.60).gif createFormRun Creates the context form and returns a FormRun object. The FormRun.init method is called by the method.
Gg771018.privmethod(en-us,AX.60).gif createFormRunWithArgs
Gg771018.privmethod(en-us,AX.60).gif createFormRunWithFormRef
Gg771018.privmethod(en-us,AX.60).gif cutInfolog
Gg771018.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif find Uses the FormDataSource.findRecord method to find the alerted buffer in the form data source, but only if canUseFindRecord returns true.
Gg771018.pubmethod(en-us,AX.60).gif findTimed Calls FormDataSource.findRecord. It is called by using a timeout from the find method.
Gg771018.privmethod(en-us,AX.60).gif focusOnControlName
Gg771018.privmethod(en-us,AX.60).gif getPrimaryIndex
Gg771018.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif new Initializes a new instance of the Object class. (Inherited from Object.)
Gg771018.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.)
Gg771018.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.)
Gg771018.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif pack Serializes the current instance of the EventContextInformation class.
Gg771018.privmethod(en-us,AX.60).gif packFds
Gg771018.pubmethod(en-us,AX.60).gif parmAlertBuffer Gets or sets the AlertBuffer parameter.
Gg771018.pubmethod(en-us,AX.60).gif parmAlertFormDsName Gets or sets the AlertFormDsName parameter.
Gg771018.pubmethod(en-us,AX.60).gif parmDontUseFormRunFromMenuItem Gets or sets the DontUseFormRunFromMenuItem parameter.
Gg771018.pubmethod(en-us,AX.60).gif parmFormControlName Gets or sets the FormControlName parameter.
Gg771018.pubmethod(en-us,AX.60).gif parmFormRun Gets or sets the FormRun parameter.
Gg771018.pubmethod(en-us,AX.60).gif parmMenuItemName Gets or sets the MenuItemName parameter.
Gg771018.pubmethod(en-us,AX.60).gif parmMenuItemType Gets or sets the MenuItemType parameter.
Gg771018.pubmethod(en-us,AX.60).gif parmPackedArgs Gets or sets the PackedArgs parameter.
Gg771018.pubmethod(en-us,AX.60).gif setEventRuleId Sets the internal eventRuleId.
Gg771018.privmethod(en-us,AX.60).gif setLookup
Gg771018.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif unpack Deserializes the _packedFormRun parameter value to an instance of the EventContextInformation class.
Gg771018.privmethod(en-us,AX.60).gif unpackFds
Gg771018.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.)
Gg771018.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg771018.pubmethod(en-us,AX.60).gif Gg771018.static(en-us,AX.60).gif ::construct Initializes a new instance of the EventContextInformation class.
Gg771018.privmethod(en-us,AX.60).gif Gg771018.static(en-us,AX.60).gif ::getFldIdsValues Gets the field IDs and values from the records that are found when running a query using the record to be drilled down.
Top

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(); 
}

Object Class
  EventContextInformation Class

Community Additions

ADD
Show: