Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

IS there a way to override the default button behaviour for a field?

Posted on by 245

Hi

I want to override the default behavoir, when a certain field is selected. Normally when you the press enter the default behavior is to close that window.  I have add it a search field to that window and i want to perform a search when text is enter and enter is press. The what this only when this field is selected. If this field is not select I want to the form to close.

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: IS there a way to override the default button behaviour for a field?

    Yes you can, all button BeforeUserChanged event contains a variable called "CancelLogic" just pass "True" to this variable and your VBA code will override original GP code.

    Add this to the original GP button.

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans