Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Suggested answer

How to override a lookup event handler which is already there

(1) ShareShare
ReportReport
Posted on by 463
Hi People,
 
We have come across a issue where there is a String form control in out of the box form and a OnLookup event handler is written against it by Microsoft. Now, we have a requirement to have a different lookup for the control and when we write a OnLookup event in our model, both the events are getting triggered and it is throwing an error. So, Is there a way that we can stop the OnLookup event from Microsoft?
 
Regards,
Verma MC
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,661 Super User 2024 Season 2 on at
    How to override a lookup event handler which is already there
    Hi Verma,
     
    There is no option to override the coding. As a workaround, you can make the current control not visible and add a new control for the JournalName field. This will not stop users from personalizing the form and make the original field visible, unless you restrict users from making personalizations on this form.
  • VermaMC Profile Picture
    VermaMC 463 on at
    How to override a lookup event handler which is already there
    Is there any feasible approach for this one?
     
     
  • VermaMC Profile Picture
    VermaMC 463 on at
    How to override a lookup event handler which is already there
    Hi everyone,
     
    Anyone has any suggestions on this one?
  • VermaMC Profile Picture
    VermaMC 463 on at
    How to override a lookup event handler which is already there
    Thanks for the response, Andre.

    The lookup is on PriceDiscAdmTable form. The lookup is on JournalName form control. There is a Custom flags that the business want to add to the lookup. Based on those flags there will be some custom ranges will be applied to the journal name lookup. MS has already added some code on the control's OnLookup event to override and cancel the lookup that the control gets from table field EDT. So, we are getting an error as both are getting called when we try that lookup.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,661 Super User 2024 Season 2 on at
    How to override a lookup event handler which is already there in d365fo
    Hi Verma,
     
    Can you mention the object where you need another lookup? Is the lookup fully created with x++ coding or is a lookup form used here? What is the exact business reason for another lookup? 

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

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans