web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Suggested Answer

Call a method when modify certain field on a dialog

(0) ShareShare
ReportReport
Posted on by

I have dialog  with four fields, I need to call certain method if the value of certain field is modified( similar to override modified method of a field on a from), how can I do this ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Ivan (Vanya) Kashperuk Profile Picture
    Microsoft Employee on at

    If you are on AX version earlier than AX 2012, you should look into the controlMethodOverload examples on the web.

    For example, this project (kashperuk.blogspot.dk/.../3-dialog-extensions.html) shows how you can override the lookup method - modified is pretty much the same, just a different method name and all.

    Note the suggestion in the blog post above about using a separate AOT form instead of the dialog, keeping the code and design cleaner.

    If you are on AX 2012, there is a new method "registerOverrideMethod", which you can call on the DialogField, specifying a method that should be used as the lookup/modified method event handler.

  • Suggested answer
    Community Member Profile Picture
    on at

    You should override dialogSelectCtrl() method

    this will help you populating vlaues in the fields on the dialog

    please review Classes\BOMHierarchyCheckJob

    For more details please follow following link

    msdn.microsoft.com/.../runbase.dialogselectctrl.aspx

    Please verify and update us if this information helps you.

  • Community Member Profile Picture
    on at

    Hi Nitesh

    I could not find any method like dialogSelectCtrl() in dialog class can you please suggest.

  • RobertCho Profile Picture
    75 on at

    You probably mean RunBase or RunBaseBatch dialog. If yes, use registerOverrideMethod on dialog control.

    Step by step:

    community.dynamics.com/.../ax2012-dynamic-actions-on-runbase-dialog

  • Suggested answer
    Inkogo Profile Picture
    2 on at

    9efb7ddf-0b37-495d-b344-5ece5b65753c

    The operation of dialogSelectCtrl() method is very different. The dialogSelectCtrl method only runs when you "select" a field, not when you modify it's value. The method is invoked when You hit the field, but after that You can modify the value 1000 times, it not invokes the dialogSelectCtrl method again.

    The registerOverrideMethod is available from AX2012 only.

    You can find the solution here for AX2009:

    microsoft-dynamics-ax-erp.blogspot.com/.../how-to-override-event-methods-on-dialog.html

    Best regards!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans