Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

What is the purpose of use registerOverrideMethod

(0) ShareShare
ReportReport
Posted on by 2

Dear All,

Can you please let me know when we need to use exactly registerOverrideMethod ?

What is the purpose of use this method?

What its does exactly?

Please give me more shed on this.

Thanks!

*This post is locked for comments

  • uzk_dynamics Profile Picture
    uzk_dynamics 170 on at
    RE: What is the purpose of use registerOverrideMethod

    In your example, what is meant by "this" in the following line of code :

    control.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(ClassName, customerLookup), this);

  • @rp@n Profile Picture
    @rp@n 2 on at
    RE: What is the purpose of use registerOverrideMethod

    Thanks Chaitanya and Sukrut

  • Verified answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: What is the purpose of use registerOverrideMethod

    Hi,

    Also typically your code would be like below:

    In method dialog:

     dialogCustAccount = dialog.addFieldValue(extendedTypeStr(CustAccount), custAccount, "Customer");
        control          = dialogCustAccount.fieldControl();
        control.registerOverrideMethod(methodStr(FormStringControl, lookup), methodStr(ClassName, customerLookup), this);


    Implement new method customerLookup with below signature

    public void customerLookup(FormStringControl _entityNameControl)
    {
    }


  • Verified answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: What is the purpose of use registerOverrideMethod

    Hi,

    In your particular scenario, you have to override lookup method on your customerAccount control using registerOverrideMethod on the dialog in the dialog method and perform lookup using SysTableLookup.

  • @rp@n Profile Picture
    @rp@n 2 on at
    RE: What is the purpose of use registerOverrideMethod

    Thanks Sukrut,

    what I understand, suppose I have 2 dialog fields

    Dialog 1: Customer Group : A, B, C

    Dialog 2: Customer account :

    Note : I want when I select Customer Group A then in Customer Account it will show only those customer which is belongs to Customer Group A only.

    For other groups also the same way.

    To do this we need to use registerOverrideMethod for Customer account.

    Is't correct?

    Please give me more shed on this.

    Thanks!

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans