Developing for Dynamics GP

by David Musgrave (Perth, WA, Australia) and the Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

Opening a Form after Logging into Microsoft Dynamics GP

Opening a Form after Logging into Microsoft Dynamics GP

  • Comments 3

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. 

David

  • Ok.  good to know.  I'll try that.

  • David,

    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.

    MG.-

    Mariano Gomez, MVP

    Maximum Global Business, LLC

    http://www.maximumglobalbusiness.com

  • 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.

    David

Page 1 of 1 (3 items)
Comments Information

PLEASE READ BEFORE POSTING

Please only post comments relating to the topic of this page.

If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.

Leave a Comment
  • Please add 2 and 3 and type the answer here:
  • Post