Access to certain system-level actions in controlled through the use of the system password, which was defined when Microsoft Dynamics GP was installed. When a user tries to access one of these restricted actions, a password dialog is displayed, prompting them for the system password. The user must supply the appropriate system password to continue.
You may have system-level functionality in your integrating application, such as setup or configuration windows, that should be restricted in this same manner. You can use the GetValidSystemPassword() function provided by Microsoft Dynamics GP to prompt the user for the system password. If they enter the correct password, you can allow them to access the restricted functionality.
The following example is the form pre script for the IG_Sample_Setup form. It uses the GetValidSystemPassword() function to restrict access to the setup window for the sample integrating application.
local boolean result; result = GetValidSystemPassword(); if result = false then close form IG_Sample_Setup; abort script; end if;
Carefully consider where you place the GetValidSystemPassword() function to control access. For example, when restricting access for a form, place the function in the form pre script. This ensures that the restriction code is run, regardless of how the form is opened.