Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Need to select Ok button by default

(0) ShareShare
ReportReport
Posted on by

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
    101,158 Moderator 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
    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
    101,158 Moderator 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
    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
    22,352 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
    101,158 Moderator 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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,467 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,066 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans