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 :
Finance | Project Operations, Human Resources, ...
Answered

Cancel or replace a previously registered override method on form control

(0) ShareShare
ReportReport
Posted on by 18

Hi all,

I need to customize standard FO by adding a range to a lookup in the LogisticsPostalAddress form. The standard lookup method is registered through the registerOverrideMethod, and the only way I found possible (due to most of the standard methods being declared private) is to register a new custom lookup method and call it after the call to the standard one. However, I am getting the error RegisterOverrideMethod was called twice for the same object for method 'lookupReference', You can only override a method once per instance., which is understandable. How can I clear the standard registered lookup method, and register my own method, in a way that there would only be one overridden method?

Thanks for your help,
Kyle

I have the same question (0)
  • Komi Siabi Profile Picture
    13,093 Most Valuable Professional on at

    Hi kypardi ,

    I don't think, I understand your requirement.

  • Verified answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi kypardi,

    You need to use a form control lookup event handler. Build a lookup from the scratch and you need to cancel the super call of the standard lookup method using the below code.

    FormControlCancelableSuperEventArgs ce = e as FormControlCancelableSuperEventArgs;
    ce.CancelSuperCall();

    Thanks,

    Girish S.

  • kypardi Profile Picture
    18 on at

    Thanks Girish, that solved it. I guess I was overcomplicating it. One question, is this also achievable via CoC?

  • GirishS Profile Picture
    27,827 Moderator on at

    No this is not available for COC.

    Thanks,

    Girish S.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 540 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans