web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
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 471
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
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    299,030 Super User 2025 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? 
  • VermaMC Profile Picture
    471 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.
  • VermaMC Profile Picture
    471 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
    471 on at
    How to override a lookup event handler which is already there
    Is there any feasible approach for this one?
     
     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    299,030 Super User 2025 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.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 947

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 176 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans