How to hide +New option from lookup fields in D365?

In a Model-Driven App, a lookup field is a special type of field that allows you to reference records from another entity or table. Essentially, it enables linking data across different entities or tables.

Typically, lookup fields include a “+ New” option, which lets users create a new record in the related table and automatically associate it with the current record.

A screenshot of a computer

AI-generated content may be incorrect.

What happens if a user tries to create a new record from a lookup field, but they don’t have access to the related entity?
In such cases, the best approach is to prevent the user from creating a new record directly from the lookup field by hiding the “+ New” button.

There are two common ways to restrict users from creating new records via lookup fields:

  1. Remove the Create privilege for the target entity in the user’s security role.
  2. Hide the “+ New” button in the lookup field by modifying the form XML using tools like FormXml Manager.

Removing the Create Privilege for a Target Entity

To prevent users from creating new records for a specific entity, follow these steps to remove the Create privilege:

  1. Navigate to Advanced Settings in your environment.
    A screenshot of a computer

AI-generated content may be incorrect.
  2. Under Power Platform Environment Settings, Go to System > Security
  3. Open Security Roles, then select the specific role you want to modify
  4. Under the Core Records or Custom Entities tab, locate the target entity
  5. Remove the Create privilege for that entity.
  6. Click Save and Close to apply the changes.

A screenshot of a computer

AI-generated content may be incorrect.

Hiding the “+ New” Button Using XrmToolBox and FormXML Editor

To hide the “+ New” button in a lookup field using the XrmToolBox, follow these steps:

  1. Install XrmToolBox if you haven’t already
  2. Connect to your organization:
    • Launch XrmToolBox
    • Enter your credentials and select Office 365 as the deployment type
  3. Once connected, go to Tools and search for FormXmlManager
  4. Install the FormXML Manager Tool if it’s not already installed
  5. Reconnect to your organization and select the appropriate environment
  6. Click Load Entities to retrieve the list of all entities.
  7. Select the desired entity, then choose the relevant form from the right-hand panel
  8. Click Edit Form XML to begin modifying the form and hide the “+ New” button
  9. Insert the following line into the parameters section of the lookup field:

<parameters>

<IsInlineNewEnabled>false</IsInlineNewEnabled>

</parameters>

A screenshot of a computer

AI-generated content may be incorrect.

A white paper with red and blue text

AI-generated content may be incorrect.

  1. Update and publish the XML.
  2. Verify the field in the UI—if successful, the ‘New’ button will be hidden for the lookup field (refresh cache if required Ctrl+F5).
    A screenshot of a computer

AI-generated content may be incorrect.

YAY! 😊

This entry was posted in D365 Customer Engagement (CRM), D365 Customer Service, D365 Project Operations, Power Platform and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *