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

Notifications

Announcements

No record found.

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
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans