Skip to main content

Notifications

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

FormRun object does not have method 'Method Name' : Getting error while overriding FormListControl method

(0) ShareShare
ReportReport
Posted on by 15

Hi Everyone,

While trying to do some development around overriding a method, getting an error while trying to override a method on my custom form

pastedimage1683115062760v1.png

I tried to override the standard method 'Selection changed' of a 'FormListViewControl' on a form with my own 'RegisterMethod' but got the above error.

Then I tried to create to create one custom method in the FormListViewControl itself and tried overriding that. But getting the below error in that.

pastedimage1683115694388v3.png

pastedimage1683115737029v4.png

Please suggest what exactly I'm doing wrong here.

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: FormRun object does not have method 'Method Name' : Getting error while overriding FormListControl method

    Hi,

    You cannot use custom method other than in build standard method available in FormListControl using registerOverride function. If you create new method and use this method, I think it won't accept it as override method. Each override method has its specific functionality.

    As Mohit suggested use SelectionChanged method or explain the functionality you are trying to achieve.

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: FormRun object does not have method 'Method Name' : Getting error while overriding FormListControl method

    Compilation error is correct, please use SelectionChanged method. Also, you need to pass the Form Control in RegisterMethod. Please check the article I shared and you can check this old thread

    community.dynamics.com/.../registeroverridemethod-in-d365

  • dynamics noob Profile Picture
    dynamics noob 15 on at
    RE: FormRun object does not have method 'Method Name' : Getting error while overriding FormListControl method

    Hi,

    I tried using selection changed first, it did not give me any error at compilation time but threw an error at run time(as shown in the first snip).

    Then I tried overriding with another method 'testSelection' and it threw me compilation error(third snip).

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,554 Super User 2024 Season 1 on at
    RE: FormRun object does not have method 'Method Name' : Getting error while overriding FormListControl method

    Hi, I think the issue is that your are passing testSelection instead of method SelectionChanged in registerOverridesMethod.

    check this article

    dynamics365musings.com/.../

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…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,996 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,853 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans