Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

A third-party customization is still triggered even if a user cannot log on to the company in Microsoft Dynamics GP


Symptoms

When a user clicks OK in the Company Login window in Microsoft Dynamics GP, the user cannot log on to the company. However, a third-party customization is still triggered. For example, if a company is already logged on to, users cannot log on to the company. However, a trigger can unexpectedly access tables in the company database.

Note If you are a developer, you can register the trigger after you change the OK Button script for the Switch Company window of the Switch Company form.

↑ Back to the top


Resolution

To resolve this problem, use the following global procedures in the script:
  • Add_Successful_Login_Record
  • Add_Successful_Logout_Record
For example, you can use both global procedures in the following script:

pragma(disable warning LiteralStringUsed);
{ Log in and Log out Triggers }
if Trigger_RegisterProcedure(script 'Add_Successful_Login_Record', TRIGGER_AFTER_ORIGINAL, script Set_Environment) <> SY_NOERR then
warning "Log on procedure trigger registration failed.";
end if;
if Trigger_RegisterProcedure(script 'Add_Successful_Logout_Record', TRIGGER_AFTER_ORIGINAL, script Set_Environment_POST) <> SY_NOERR then
warning "Log off procedure trigger registration failed.";
end if;
pragma(enable warning LiteralStringUsed);

↑ Back to the top


Keywords: kbexpertiseadvanced, kbmbspartner, kbexpertiseinter, kbhowto, kbinfo, kbmbsmigrate, kbexpertisebeginner, kb

↑ Back to the top

Article Info
Article ID : 943959
Revision : 1
Created on : 3/13/2017
Published on : 7/14/2012
Exists online : False
Views : 92