We will learn to hide the +New button from a Lookup field in Dynamics 365 / Model-Driven App. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Platform.
![hide remove new button lookup](https://www.crmcrate.com/wp-content/uploads/2022/11/image-1024x346.png)
Why do we need to hide or remove the +New button from a lookup?
Consider a requirement where you need to remove the +New button for limiting the system users from creating a new record in the lookup’s target table.
![](https://www.crmcrate.com/wp-content/uploads/2022/11/image-6-1024x480.png)
This requirement can be achieved from two different ways:
Approach 1 –
Edit the Security Role and remove the “CREATE” privilege from the Lookup’s target entity.
Approach 2 –
Customize the Lookup component XML from backend for hiding / removing the +New button.
We learn to remove the +New button by customizing the XML as shown below.
Removing the +New button from a Lookup by customizing the solution XML
Follow the below steps for removing the button from a Lookup field:
Step 1 – Creating & Exporting a Solution
- Open the Power Apps Studio (https://make.powerapps.com/).
- Navigate to Solutions and create a new un-managed solution.
- Add an Entity / Table form where the lookup field is residing within this newly created un-managed solution.
![](https://www.crmcrate.com/wp-content/uploads/2022/11/image-1.png)
![](https://www.crmcrate.com/wp-content/uploads/2022/11/image-5-1024x485.png)
- Export the solution as an “Un-Managed” solution.
Step 2 – Customizing the Solution XML & Re-Import the Solution
- Navigate to the folder where the newly created un-managed solution is exported. Un-Zip the solution as shown below.
![](https://www.crmcrate.com/wp-content/uploads/2022/11/image-3-1024x105.png)
- Open the file “customizations.xml” in Visual Studio as shown below.
![](https://www.crmcrate.com/wp-content/uploads/2022/11/image-4-1024x254.png)
- Within the Customization XML, navigate to the XML tag where the lookup field resides. In this scenario, we will be searching the name of our lookup field which is “cc_contact” in the Customization.XML file.
- Now, add an addition XML Tag specifying the parameter “IsInlineNewEnabled” as false as given below in the XML Code.
<parameters> <IsInlineNewEnabled>false</IsInlineNewEnabled> </parameters>
![](https://www.crmcrate.com/wp-content/uploads/2022/11/image-7-1024x464.png)
- Once the XML is modified, save the file, compress the file to a new solution Zip and re-import the solution into the Model-Driven App / Dynamics 365 CRM.
- After the successful re-import, validate that the “+New” button is removed from the lookup field as shown below.
![](https://www.crmcrate.com/wp-content/uploads/2022/11/CRMCrate_LookupNewButtonRemoveXML.gif)
Great Article.
Is the approach of editing Customizations.xml file for removing button considered as Supported Customizations by Microsoft?
Hello,
No, customizing XML is not supported by Microsoft.