Home > Dynamics Ax > Preventing a form getting added to “LastActivated Form” in Dynamics Ax

Preventing a form getting added to “LastActivated Form” in Dynamics Ax

     

The Class "Infolog" has few methods corresponding to "Last activated form" like
 
                       – activate
                      –  setLastActivatedForm
                      –  parmLastActivatedForm
                      –  close
 
     These methods help in you knowing, setting or getting the currently active form.
 
       Say you have a form like "Toolbar" or  "Popup" form like Alerts or "Find" then you would prefer to prevent these form from being added to the lastactivated form. In such cases all you have to do is go to the "activate" method in infolog and add the following code

    if (formRun.name() != formstr(DocuView) &&
        formRun.name() != formstr(sysFormSearch) &&             
        formRun.name() != formstr(EventAttentionGrabber) &&
        //added by kamal

        formRun.name() != formstr(MyForm)        
       )
    {
        this.setLastActivatedForm(formRun);
    }

  This would skip adding your form to the last activated form list.

……………….Light bulb

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

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

%d bloggers like this: