Skip to main content

Notifications

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

  • Suggested answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at
    RE: How to Trigger an event before closing the GP

    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.

  • Suggested answer
    jo_gourav Profile Picture
    387 on at
    RE: How to Trigger an event before closing the GP

    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. 

  • Verified answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at
    RE: How to Trigger an event before closing the GP

    try

    AddHandler Dynamics.Forms.MainMenu.Procedures.ExitDynamics.InvokeBeforeOriginal, AddressOf DoSomeThingBeforExit
    
  • jo_gourav Profile Picture
    387 on at
    RE: How to Trigger an event before closing the GP

    Can any one having some idea about it...

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans