web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

How to Trigger an event before closing the GP

(0) ShareShare
ReportReport
Posted on by 387

Dear All,

I would like to register a trigger in before closing dynamics GP from Exit button or from the direct close(X) from top of GP.

Public Class GPAddIn

Implements IDexterityAddIn

' IDexterityAddIn interface

Sub Initialize() Implements IDexterityAddIn.Initialize

Please suggest something which I register here and that event called before closing the GP,the event registere would check the resourses(e.g. Connection) if already opened then  need to close

'AddHandler Dynamics.Forms.Toolbar.MainMenu1.CloseBeforeOriginal, CloseForm()

Any help Please!!!!.

 

 

*This post is locked for comments

I have the same question (0)
  • jo_gourav Profile Picture
    387 on at

    Can any one having some idea about it...

  • Verified answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    try

    AddHandler Dynamics.Forms.MainMenu.Procedures.ExitDynamics.InvokeBeforeOriginal, AddressOf DoSomeThingBeforExit
    
  • Suggested answer
    jo_gourav Profile Picture
    387 on at

    Thanks Almas, 

    One more issue is, can i stop GP from closing from this event because if my changes in another custmozied screen are not saved, i need first to save the data on that screen before closing the GP. 

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    yes, you can try initiating a dummy background process which can check if required information has been entered or not and prompt user to enter it and then complete the process.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans