Args Class

The Args class is used to pass arguments such as a name, a caller, and parameters between application objects.

Syntax

class Args extends xArgs implements SysPackable

Run On

Called

Methods

  Method Description
Gg802600.pubmethod(en-us,AX.60).gif allowUseOfPreloadedForm Determines if the form launched for this instance may come from the pre-loaded form pool. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif arrIdx (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif caller Gets or sets the instance of the object that created the instance of the Args class. (Overrides the caller Method.)
Gg802600.pubmethod(en-us,AX.60).gif callerFormControl (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif copyCallerQuery (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif dataset Gets the table ID of the table in which the caller object is working. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif designName Gets or sets a string that indicates a design on a report or form. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif extType (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif finalize Removes the current instance of the xArgs class from memory. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif formViewOption (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif initialQuery (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif lookupField Gets or sets the field ID in a table to use to look up a specified record. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif lookupRecord Finds a record in the specified table. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif lookupTable (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif lookupValue Gets or sets a string to use with the LookupField method to find a value in a field of a table. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif managedContentItemName (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif menuItemName Gets or sets the name of the menu item to use to start the application object. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif menuItemType Gets or sets the type of the menu item to use to start the called application object. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif multiSelectionContext (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif name Gets or sets the name used in code to identify a form, report, rable, query, or another MSDAX application object. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif new Initializes a new instance of the Object class. (Inherited from xArgs.)
Gg802600.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.)
Gg802600.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.)
Gg802600.pubmethod(en-us,AX.60).gif object Gets and sets the application name of the object for which to open a new instance. (Overrides the object Method.)
Gg802600.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif openMode (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif pack Serializes the current instance of the Args class.
Gg802600.pubmethod(en-us,AX.60).gif parentWnd (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif parm Gets or sets the parameter. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif parmEnum Gets or sets the enumeration value of the enumeration type that is specified in the parmEnumType method. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif parmEnumType Gets or sets the EnumType parameter. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif parmObject Gets or sets the instance of any object to pass to the called object. (Overrides the parmObject Method.)
Gg802600.pubmethod(en-us,AX.60).gif record Gets or sets the record from the table on which the caller object is working. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif refField (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif selectField (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif setupArgs (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif toString Retrieves a string representation of an instance of the xArgs. (Inherited from xArgs.)
Gg802600.pubmethod(en-us,AX.60).gif unpack Deserializes the _pack parameter value to an instance of the Args class.
Gg802600.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.)
Gg802600.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg802600.pubmethod(en-us,AX.60).gif Gg802600.static(en-us,AX.60).gif ::copyArgs Copies data from an Args object into another Args object.
Gg802600.pubmethod(en-us,AX.60).gif Gg802600.static(en-us,AX.60).gif ::create Creates a new instance of an Args class.
Gg802600.pubmethod(en-us,AX.60).gif Gg802600.static(en-us,AX.60).gif ::createFromArgs Creates a new instance of an Args class based on another instance of the Args class.

Top

Remarks

Forms, reports, and queries all use this class as their first argument in the constructor.

The preferred way to use this class is to call the Args.construct method, supply a name-string, and then pass the Args object to the constructor of the form or a ClassFactory method. If you want to see the xArgs object passed to one of these classes, it can be reached using the args method of that class.

The instance of the Args class that is sent from the caller can be created automatically by the kernel or explicitly by the caller. When the caller uses a menu item to call an object, an instance of the Args class is created by the kernel code. The menu item name will be set to the name of the menu item used. If the menu item has values for the Parameters , EnumParameter , or EnumTypeParameter properties set, the kernel will set the values of the corresponding Parm, ParmEnum, or ParmEnumType properties for this instance of the Args class.

Examples

The following example demonstrates how to explicitly create an instance of the Args class:

public static void main(Args args)
{
    BankPaymCancel  bankPaymCancel;
    Args    localArgs = new Args();
 
    // Check the instance of the args class passed into this main method.
    if (args && args.record())
    {
        bankPaymCancel = BankPaymCancel::newBankPaymCancel(args.record());
 
        if (bankPaymCancel.prompt())
        {
//The following lines set the caller and record methods on the instance of the localArgs class.
            localArgs.caller(bankPaymCancel);
            localArgs.record(args.record());
            BankPaymCancel::serverRun(localArgs);
        }
    }
}

The following code example consumes an instance of the Args class:

public void  init()
{
    super();
 
    //Check to see if the parmEnumType method has been set.
    if (element.args().parmEnumType())
    {
        //Get the enum value specified in the parmEnum method.
        salesUpdate = element.args().parmEnum();
        selectionUpdate.selection(salesUpdate);
    }
 
    //Get the TableId value of the table record passed in the record method.
    switch(element.args().record().TableId)
    {
        case tablenum(SalesTable)       :
            break;
 
        case tablenum(SalesParmTable)   :
            salesParmTable= element.args().record();
            selectionUpdate.allowEdit(false);
            selectionUpdate.skip(true);
            selectionUpdate.visible(false);
            groupSelectionUpdate.visible(true);
            break;
 
        case tablenum(SalesBasket)   :
            salesBasket= element.args().record();
            selectionUpdate.allowEdit(false);
            selectionUpdate.skip(true);
            selectionUpdate.visible(false);
            groupSelectionUpdate.visible(true);
            break;
    }
}

Inheritance Hierarchy

Object Class
  xArgs Class
    Args Class
      SysArgs Class

See Also

FormRun Class

ReportRun Class

QueryRun Class