Opening a Form after Logging into Microsoft Dynamics GP

David MeegoAs a follow on from the post last week on capturing the logging in and logging out events in Microsoft Dynamics GP, I want to cover how to open a form after logging into Microsoft Dynamics GP.  This could be a hidden form used by your code or a window that you want to open automatically.

Please refer to the previous post for the underlying scripts:

Running Dexterity scripts after Login or before Logout

After Logging in, the system runs a number of processes in the background, such as the script which hides menu entries that a user does not have security access to.

We want our window to open after all the background processing is completed, so we need to use call background to add our command into the background queue.

Updated Set_Environment_Sub Global Procedure

MBS_Open_Form Global Procedure

Note: If this is for a hidden form, make sure that it has at least a main window (first window in list) on it which the following properties set. AutoOpen=False, Title=~internal~.  Otherwise, the hidden form will fail to open under the version 10.0 (and later) pessimistic security model. 


Comments (3)

  1. callawayx22 says:

    Ok.  good to know.  I’ll try that.

  2. mgomezb says:


    This is good to know, but I also believe you should explain what is the difference between using command forms in the startup script and this method. Command forms allow developers to have hidden forms and windows opened in memory that can be accessed at anytime in the application.


    Mariano Gomez, MVP

    Maximum Global Business, LLC

  3. David Musgrave says:

    Hi Mariano

    You are correct, it would be possible to use a hidden window on a command form when you need access to window fields in your code.

    It depends on what you need.  Command forms open quite early and when be too early to open a window that a user will see, such as a setup or installation window or an automatically opening application window.

    I use this exact method to automatically open the Support Debugging Tool’s main window after logging in when the tool is in setup mode.