Object.cancelTimeOut Method [AX 2012]

Cancels a previous method call to the setTimeOut method.

public void cancelTimeOut(int timerHandle)

Run On

Called

Parameters

timerHandle
Type: int
The handle of the scheduled event to delete. The handle is the value that is returned by the Object.setTimeOut method.

Any scheduled time-out calls that have not yet been processed are automatically deleted when the object itself is deleted.

The following example calls the Object.setTimeOut method, and then cancels the time-out.

void Object_cancelTimeOut(Args _args) 
{ 
    int th; // timerHandle. 
 
    // timedMethod is a worker method. 
    th = this.setTimeOut( "timedMethod", 2000 ); 
    //.... 
    // Remove timeOut later. 
    CancelTimeOut(th); 
}
Show: