AxdStack Class [AX 2012]

The AxdStack class provides a stack that works on classes which inherit from the AxInternalBase class.

Syntax

class AxdStack

Run On

Called

Methods

  Method Description
Gg838676.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif count Returns the number of elements in the stack.
Gg838676.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif new Initializes a new instance of the AxdStack class.
Gg838676.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.)
Gg838676.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.)
Gg838676.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif pop Pops the top AxBC object from the stack.
Gg838676.pubmethod(en-us,AX.60).gif push Pushes an AxBC object onto the stack.
Gg838676.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif top Returns the top element in the stack.
Gg838676.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Inherited from Object.)
Gg838676.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.)
Gg838676.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg838676.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)

Top

Remarks

This class is required when reading data from XML documents and when subsequently saving data as related tables.

Microsoft Dynamics AX document classes sometimes need contextual information so that they can update AxBC object data. The contextual information in this case is a stack of AxBC objects that are on the XML path and have already been saved, as well as the new AxBC object that has not been saved yet.

Examples

static void exampleMethod() 
{ 
    AxSalesTable axSalesTable; 
    AxSalesLine   axSalesLine; 
    AxdStack       axdStack = new axdStack(); 

    axSalesTable = new AxSalesTable(); 
    axdStack.push(axSalesTable); 
    axSalesLine = new AxSalesLine(); 
    axdStack.push(axSalesLine); 
    info(strfmt("There are %1 object in the stack",axdStack.count())); 
    info(strfmt( 
        "The class in the first element in the stack has the id no. '%1'", 
        classidget(axdStack.top()))); 
    axdStack.pop(); 
    info(strfmt("There are %1 object in the stack",axdStack.count())); 
}

Inheritance Hierarchy

Object Class
  AxdStack Class