How to remove create access to the Drop down

How to remove create access to the Drop down


Problem statement

In Model Driven app if you mapped a Table (Data Source) to the drop down, in the bottom of the drop down you can see the Create icon. It allows the user to create a new record to the mapped table.

We can restrict the user to do this, by disabling the Create icon.



Resolution

We can remove this Create access by modifying XML Schema.

Adding the tag <IsInlineNewEnabled>false</IsInlineNewEnabled>(usually this tag is not present in formXml), will remove the button for all users no matter what their privileges allow.


Go to Advanced Settings, and select Solution option.






Create new unmanaged solution and save.


Add required entity. (Main form and related columns/table)


Add the entity to newly created solution.




Export the solution zip file and extract the file. Open the Customizations.xml file in notepad++.

Customizations


Add code to the document


Save the customizations.xml file in the same folder.

Compress all the existing file in the folder (except the zipped old version file)

Import the new zipped file to the same environment. 

Publish all customizations.


Open the app. Verify that the button is gone now