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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Intercept/replace the New button click of lookup field?

(0) ShareShare
ReportReport
Posted on by 76

Hello

How can I intercept/replace the New button click of lookup field?

Thanks.

I have the same question (0)
  • Suggested answer
    prt33k Profile Picture
    6,907 on at

    Hi Marina,

    You need to remove the 'Create' privilege from the users security role for lookup entity to hide the 'New' button.

    That is the only supported way.

    Thanks,

    Prateek

  • Marina Karapetyan Profile Picture
    76 on at

    Hello Prateek,

    Thank you for your answer, but I want to write my own logic when click New button of lookup field.

    So, I am going to write JS and customise button or command. Is it possible ?

  • Suggested answer
    prt33k Profile Picture
    6,907 on at

    Hi Marina,

    D365 doesn't provide a way to customize the lookup control. So you won't be able to write JS on the + button in a supported way.

    However, You can always build a custom PCF Control and add your functionality there.

    Thanks,

    Prateek

  • Suggested answer
    David Pezzoli Profile Picture
    14 on at

    Hi Marina Karapetyan,

    as an alternative to PCFs, you can:

    1. add a Recommendation Action button on lookup field (column) using the JS command:  formContext.getControl(lookupfield).addNotification(notification) https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/controls/addnotification
    2. inside command "notification" Object you can call an action on-demand using "actionCollection.actions": for example open a dialog form via navigateTo or call another action....Lookup-wit-recommendation.png
    3. hide the "+ new item record" lookup button (in order to avoid unwanted behavior lookup): 

    https://blog.magnetismsolutions.com/blog/jaredjohnson/2020/04/03/--toggling-the-new-button-in-inline-lookups-in-dynamics-365-

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
11manish Profile Picture

11manish 119

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans