Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Need to select Ok button by default

Posted on by Microsoft Employee

Hi, I am new to AX. I have a class extends Runbase, I am  getting value from dialog box. In dialog box 3 text field, ok and cancel button are there. If I press enter key at text field the application crashes. If I click Ok button it is working fine.

I want to set by default Ok button, if enter key is pressed at any of the text field.

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Need to select Ok button by default

    Sure. But if all RunbaseBatch based dialogs are crashing in your system when you press enter, I warmly recommend to look into it. This has much wider impact in your system than just the one dialog that you are implementing now.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to select Ok button by default

    Can I create a separate form for this dialog box and call the class from that form?

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Need to select Ok button by default

    Then it's something wrong in your system. Not in your class.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to select Ok button by default

    Nope, In Tutorial_RunBaseBatch class, if I press enter key, application crashes.

  • WillWU Profile Picture
    WillWU 22,350 on at
    RE: Need to select Ok button by default

    Hi praveenrajms,

    Please check the event viewer for more details.

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Need to select Ok button by default

    By default, clicking Enter should cause OK button to be clicked. Perhaps you made some mistake in your code.

    Check Tutorial_RunBaseBatch class, there it works.

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans