Skip to main content

Notifications

Announcements

No record found.

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

RegisterOverrideMethod

(2) ShareShare
ReportReport
Posted on by 1,249
Hi,

can we use "register override method" when overriding lookup for reference group? if yes then how?
Categories:
  • Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RegisterOverrideMethod
    1. The replacement key is used to replace the surrogate key with a natural key in GUI. No such a replacement is needed if no surrogate key is involved.
    2. A table can can several unique keys, but only one of them can be primary.
     
     
  • .. Profile Picture
    .. 1,249 on at
    RegisterOverrideMethod
    Hi Martin,

    1. So if the primary key was Not surrogate key, then in this case, we can have to leave replacement key as empty then use resolveReference method?
     
    2. what's the difference between primary key and an index with duplicate No?
  • Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RegisterOverrideMethod
    No, I wasn't talking about that at all.
    If your table has SurrogateKey as the primary index, you should always set the replacement key.
  • .. Profile Picture
    .. 1,249 on at
    RegisterOverrideMethod
    Hi Martin,

    you mean i use this method, when I leave the replacement key property on the table as empty?
    in what cases i would need to leave this property as empty? can you explain it to me please?
  • Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RegisterOverrideMethod
    If you don't want to wait hours for an answer, simply try it. You'll see that resolveReference() isn't needed for the lookup.
     
    It's not used very often; it's for some special cases when you don't use a key in the replacement group.
  • .. Profile Picture
    .. 1,249 on at
    RegisterOverrideMethod
    any idea?
  • .. Profile Picture
    .. 1,249 on at
    RegisterOverrideMethod
    Ok, if I will go with the lookup reference example, they also use resolveReference method with it, do i need it as well? And what does this resolveReference do in the first place?
  • Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RegisterOverrideMethod
    I'm not sure, but I always use the method specific to reference groups: lookupReference().
  • .. Profile Picture
    .. 1,249 on at
    RegisterOverrideMethod
    Hi Martin,

    one of your examples uses "formReferenceControl" with "lookupReference" method and "resolveReference" method, like this:



    And the other one uses "formReferenceGroupControl" with "lookup" method

     
    what's the difference between the two??
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RegisterOverrideMethod
    Yes, it's possible.
     
    You can find several examples in the existing codebase, e.g. in BusinessProcessGenericTaskEditorDialog_PersonnelManagement_Extension or CaseDetailEventHandler class.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans