EventCreateRule Class [AX 2012]
The EventCreateRule class is a standard RunBase inheritance that is used for creating rules.
Syntax
class EventCreateRule extends RunBase
Run On
Called
Methods
Method | Description | |
---|---|---|
addRecIdRange | Adds a range of record IDs to the query when an alerted table is selected table to create an alert rule. | |
alertFieldChange | Used by the EventCreateRule form to set the current TmpEventAlertField record. The current TmpEventAlertField record reflects the chosen field for rule creation. | |
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) | |
canCreateRule | Determines whether a rule can be created. | |
canGoBatch | Returns false in this class. (Inherited from RunBase.) | |
canSwapBetweenCS | Controls whether a calledFrom class that is instantiated on the server should have its prompt executed on the client. (Inherited from RunBase.) | |
caption | Returns the description from the current class by calling the static description method on the class if there is one. (Inherited from RunBase.) | |
checkAlertField | Tests whether the text entered in the Alert Field control is valid, by trying to find a corresponding record in the TmpEventAlertField temporary table. | |
checkCloseDialog | Must be called in the CloseOk method of a RunBase dialog box. (Inherited from RunBase.) | |
checkForeignKey | Tests whether the field specified in the rule is a foreign key. Creates a click-once message to the user describing what to do if the user wants to be alerted when the foreign key is changed. | |
cleanupDialog | Provides a way to clean up after a dialog box has been canceled. (Inherited from RunBase.) | |
control2DsId | ||
cursorHasRecord | ||
dialog | Returns a class that contains the methods that are described by the RunBaseDialogable interface. (Overrides the dialog Method.) | |
dialogClear | Clears the contents of the dialog box. (Inherited from RunBase.) | |
dialogInit | Initializes the dialog box. (Inherited from RunBase.) | |
dialogInternal | (Inherited from RunBase.) | |
dialogMake | Obtains the dialog from a RunBase class. (Inherited from RunBase.) | |
dialogPost | Makes it possible to add controls after the main dialog method has been run because this method is called after the dialog method is called. (Inherited from RunBase.) | |
dialogPostInit | Called right after the RunBase.dialogInit Method method. (Inherited from RunBase.) | |
dialogPostRun | Called after the Dialog.run Method class. (Inherited from RunBase.) | |
dialogReInit | Reinitializes the dialog box. (Inherited from RunBase.) | |
dialogSelectCtrl | When using the dialog class for dialog, this method is called whenever a control is selected. (Inherited from RunBase.) | |
dialogTask | When using the Dialog Class class for dialog, this method is called from the task method in the dialog form. (Inherited from RunBase.) | |
dialogUpdate | Updates the dialog, for example after reinitializing the query. (Inherited from RunBase.) | |
dialogUpdateQuery | Updates the query in the dialog box. (Inherited from RunBase.) | |
disableRecIdRange | ||
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) | |
eventBuildValidAlertFields | Returns an instance of the EventBuildValidAlertFields class that corresponds to the specified FormDataSource. The instance of this class for a specific FormDataSource is only instantiated one time and is afterward kept in a Map. | |
fdsId2qbdsNo | Wraps the SysFormDataSource::fds2qbdsNo method. If the fdsId parameter is zero, the ID of the callerFormDataSource is used. | |
fieldsAreInUniqueIndex | Determines whether the fieldIds that are in the specified set are unique key fields for the specified table. | |
findValidCallerDS | ||
formDataSourceList | ||
getFromDialog | Assigns the dialog values to the internal variables. (Overrides the getFromDialog Method.) | |
getLast | Gets the last choice that is stored in the last value table. (Inherited from RunBase.) | |
getRunBase | (Inherited from RunBase.) | |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) | |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) | |
inGetSaveLast | Returns true when the GetLast or SaveLast method is executed. (Inherited from RunBase.) | |
init | Gives RunBase the same profile as, for example, a FormRun class. This method is not used in the standard application. (Inherited from RunBase.) | |
initEventRule | ||
initParameters | ||
initParmDefault | Initializes the internal variables. (Overrides the initParmDefault Method.) | |
isPseudoCursor | ||
isSwappingPrompt | Checks if the program is currently swapping from server to client. (Inherited from RunBase.) | |
lastValueDataAreaId | (Inherited from RunBase.) | |
lastValueDesignName | (Inherited from RunBase.) | |
lastValueElementName | (Inherited from RunBase.) | |
lastValueType | (Inherited from RunBase.) | |
lastValueUserId | (Inherited from RunBase.) | |
lockUserIdRange | ||
mustLoadSaveQuery | Determines whether the last query must be loaded and saved when you leave the form. Called from the SysQueryForm. (Inherited from RunBase.) | |
name | Returns the name of the RunBase class. (Inherited from RunBase.) | |
new | Initializes a new instance of the RunBase class. (Inherited from RunBase.) | |
nonFieldRelatedTmpEventAlertField | ||
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 EventCreateRule class. (Overrides the pack Method.) | |
packContextInfo | ||
parentDataSource | ||
parmCallerFormDataSource | Gets or sets the CallerFormDataSource parameter. | |
parmCallerFormRun | Gets or sets the CallerFormRun parameter. | |
parmCallerRecord | Gets or sets the CallerRecord parameter. | |
parmCreatedRuleId | Gets or sets the CreatedRuleId parameter. | |
parmDynaLinkRecord | Gets or sets the DynaLinkRecord parameter. | |
parmEventRuleFormRun | Gets or sets the EventRuleFormRun parameter. | |
parmEventRuleTmp | Gets or sets the EventRuleTmp parameter. | |
parmExpandByControl | Gets or sets the ExpandByControl parameter. | |
parmExpandHowOftenControl | Gets or sets the ExpandHowOftenControl parameter. | |
parmExpandWhoControl | Gets or sets the ExpandWhoControl parameter. | |
parmExpandWithControl | Gets or sets the ExpandWithControl parameter. | |
parmProgress | Gets or sets the Progress parameter. (Inherited from RunBase.) | |
parmRebuildQuery | Gets or sets the RebuildQuery parameter. | |
parmTmpEventAlertField | Gets or sets the TmpEventAlertField parameter. | |
prepareForRun | Allows subclasses to process the dialog box immediately before the dialog box.Run method. (Inherited from RunBase.) | |
progressHide | Hides the Progress form. (Inherited from RunBase.) | |
progressInit | Initializes the Progress object in RunBase. (Inherited from RunBase.) | |
progressKill | Kills the Progress object in RunBase. (Inherited from RunBase.) | |
prompt | (Overrides the prompt Method.) | |
promptPack | Wraps a call to the RunBase.pack Method method when packing in the RunBase.promptPrim Method method. (Inherited from RunBase.) | |
promptUnpack | Unpacks what the promptPack method has packed. (Inherited from RunBase.) | |
putToDialog | Enables setting the fields that were just added in the RunBase.dialog Method method. This method is called from the RunBase.promptPrim Method method directly following the RunBase.dialogMake Method method. (Inherited from RunBase.) | |
queryAddDynaCursor | Traverses the query of the callerFormDataSource, and for each dynaLink appends the corresponding field and dyna value to the specified query. | |
queryAddUniqueRangeAndValue | ||
queryRun | Returns the QueryRun object, which is used by the QueryPrompt. (Overrides the queryRun Method.) | |
reset | Resets the class to its default state. (Inherited from RunBase.) | |
run | Inserts a new rule into the database. (Overrides the run Method.) | |
runBase | Returns the RunBase itself. (Inherited from RunBase.) | |
runBaseDialogModifyType_RU | (Inherited from RunBase.) | |
saveLast | Saves the last choice by using the RunBase.pack Method method. (Inherited from RunBase.) | |
setAllRanges2Open | Traverses all ranges on the specified query. All ranges that have the RangeStatus set to Hidden or Locked will be changed to have the RangeStatus set to Open. | |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) | |
setValidCallerData | Sets all initializations from the caller. | |
showClearButton | Determines whether to add a Clear button to the dialog box. If you change the return value to true it will add the button. (Inherited from RunBase.) | |
showDefaultButton | Determines whether a Default button is to be added to the dialog box. If you change the return value to true, it will add the button. (Inherited from RunBase.) | |
showDialog | (Inherited from RunBase.) | |
showIndexFields | Determines whether to show index fields. (Overrides the showIndexFields Method.) | |
showQuerySelectButton | (Inherited from RunBase.) | |
showQueryValues | Determines whether to add a select button to the dialog box. (Overrides the showQueryValues Method.) | |
toString | Returns a string that represents the current object. (Inherited from Object.) | |
unpack | Deserializes the packedClass parameter value to an instance of the EventCreateRule class. (Overrides the unpack Method.) | |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) | |
validate | Validates the state of the internal variables. (Inherited from RunBase.) | |
wait | Pauses a process. (Inherited from Object.) | |
xml | Returns an XML string that represents the current object. (Inherited from Object.) | |
::construct | Constructs an instance of the class. | |
::description | Microsoft internal use only. | |
::isForeignKey | Tests whether a field is a foreign key. | |
::main | Provides an entry point for the EventCreateRule class when it is called from a menu item. | |
::newCheckFormRun | Determines whether a specified FormRun is valid for creating rules. | |
::newFindMainTableLabelFormRun |
Top
Remarks
The Prompt part holds the UI for creating the rule (Form: EventCreateRule) and the Run part inserts the rule into the database.
The class must be called by using a FormRun. Before starting the UI in the prompt method, this class will collect all valid controls from the caller FormRun. This is performed by using the class EventBuildValidAlertFields.
Examples
void MyMethod(FormRun _formRun)
{
EventCreateRule eventCreateRule = EventCreateRule::construct();
if (_formRun && _formRun.handle() == classnum(FormRun))
{
eventCreateRule.parmCallerFormRun(_formRun);
if (eventCreateRule.prompt())
eventCreateRule.run();
}
}
Inheritance Hierarchy
Object Class
RunBase Class
EventCreateRule Class