Dialog before Ax application quite

A dialog box will prompt to accept the condition from user to really quit the application or not:
Override the following method:
@ Classes\Info\canShutdown


public boolean canShutdown(boolean _silent)
{
    boolean ret;
;
    DocuFileWatchDog::openFiles(_silent);

    if(Box::yesNo("Are you sure ? You will quit Dynamics AX!",DialogButton::No, "Quit Application ?") == DialogButton::Yes)
    {
        ret = super(_silent);
        return ret;
    }
    else
    {
        return false;
       
    }
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s