Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

VS Tools for GP: AfterModalDialog Responses are Readonly

Posted on by 1,865

Hi,

I've added additional validation to the Project Maintenance window and trying to prevent users from saving it before correcting those errors.  When user closes the window with some changes in it, GP will prompt "Do you want to save changes". Upon clicking "save", my validation runs and if validation fails, I need to cancel the save operation and let user correct the error. we can achieve this in VBA by updating the Modal Dialog response to "Cancel", but VS tools for GP's AfterModalDialog event responses are Readonly and thus it's making it impossible to cancel the event.

Any Ideas?

Regards,

Jothikrishnan

*This post is locked for comments

  • Jothi Krishnan N Profile Picture
    Jothi Krishnan N 1,865 on at
    RE: VS Tools for GP: AfterModalDialog Responses are Readonly

    Thank you Shyam. I think I've tried that already and didn't work out in my case, but let me double check and update here.

  • Suggested answer
    Shyam Nath Profile Picture
    Shyam Nath 505 on at
    RE: VS Tools for GP: AfterModalDialog Responses are Readonly

    I think it will work if you change your validation from AfterModalDialog to BeforeSaveRecord event.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans