Object.wait Method [AX 2012]

Pauses a process.

public void wait()

Run On


The most common use for this method is to start an object that asks the user for some input and then call the wait method on that object, such as a form. The next line of code is not executed until the object has called the notify or notifyAll method.

When the wait method is called from a form, you do not have to call the notify methods manually because forms call the Object.notifyAll method when the user either closes the form or presses the Apply button.


This method is not meant for thread synchronization. Use the waitUntilSignaled method instead.

The following example opens the GetUserInput dialog, blocks, and waits until the user has closed the form.

    Args a = new Args("GetUserInput"); 
    formRun fr = new formRun(a); 
    // Execution will resume at this point, only after 
    // the user has closed the form. 

Community Additions