The command form for your integration should be closed when the Microsoft Dynamics GP application is closed. To do this, use a procedure trigger that is activated after the CloseCommandForms procedure is run within Microsoft Dynamics GP. The following example shows the registration for the trigger that closes the Command_IG_Sample command form in the sample integrating application:
l_result = Trigger_RegisterProcedure(script CloseCommandForms, TRIGGER_AFTER_ORIGINAL, script IG_CloseCommandForm); if l_result <> SY_NOERR then warning "Procedure trigger registration failed."; end if;
The following script runs when the trigger is activated, and closes the Command_IG_Sample form.
close form Command_IG_Sample;