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 :
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
    301,130 Super User 2025 Season 2 on at
    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
    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
    Hi everyone,
     
    Anyone has any suggestions on this one?
  • VermaMC Profile Picture
    471 on at
    Is there any feasible approach for this one?
     
     
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,130 Super User 2025 Season 2 on at
    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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 301 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Siv Sagar Profile Picture

Siv Sagar 105 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans