Hi,
I have a use case where the user can associate a parent contact on a lookup field within the contact form. In this lookup, due to other constraints related to another use case, I need to remove the '+ New Contact' button. To accomplish that, I found several solutions and the one I would like to implement is editing the customization.xml of the solution and add a new parameter control of the field, on the main form of the contact, to disable the button.
I'm looking for validation on this development, since the Microsoft does have documentation on this matter - When to edit the customizations file | Microsoft Learn - but several blogs state that it is not supported.
Other useful links:
Edit the customizations XML file with schema validation | Microsoft Learn
Hi Lau,
Overall, customizate the .XML tag is supported but not recommended.
Because the file is complex, and it’s not something you can edit easily – you have to go over a few steps to even get that file, and, then, you have to go over a few more steps to put it back to Dynamics.
Please make sure that other code in .xml will not be broken.
You can achieve this as you suggest Xml Customization or with Roles here a tutorial, doing this it's not supported.
- but as i said do it carrefully or you could break something else.
- Be sure that you really want this behavior no matter the role.
regards
Hi DAniele,
Thank you for your reply!
Well, my question is being misunderstood. I know how to do it, I even posted a blog with the steps to accomplish it. I just want to know if it supported or not editing the customization.xml within the tag FormXML.
hi
you can modify the customization.xml file in Microsoft Dynamics 365 to disable the "+ New Contact" button on a lookup field. Here are the steps to do it:
Export the solution: Before you can modify the customization.xml file, you need to export the solution from Dynamics 365. You can do this by going to Settings > Solutions, selecting the solution you want to export, and clicking the "Export" button.
Edit the customization.xml file: Open the exported solution file and locate the customization.xml file. You can edit this file using a text editor or an XML editor. Look for the <Control> element that corresponds to the lookup field you want to modify. Within this element, add a new parameter called "disableNewButton" and set its value to "true". This will disable the "+ New Contact" button on the lookup field.
Import the solution: Once you have edited the customization.xml file, save the changes and import the solution back into Dynamics 365. You can do this by going to Settings > Solutions, clicking the "Import" button, and selecting the modified solution file.
Publish the changes: After you have imported the solution, you need to publish the changes to make them active. You can do this by going to Settings > Customizations > Customize the System, selecting the modified solution, and clicking the "Publish All Customizations" button.
By following these steps, you can disable the "+ New Contact" button on a lookup field within the contact form in Dynamics 365. However, keep in mind that modifying the customization.xml file directly can be risky and can cause issues if not done properly, so it's important to test the changes thoroughly before deploying them to a production environment.
DAniele
Thank you for your reply!
What I want to accomplish is this
But I have this
So, Ribbon Workbench won't make it work since it is not a command bar button, but instead a button on the lookup field.
Hi Lau Costa,
What you saying sounds like you need to customize the command ribbon.
This task could be done by solutions and eiting XML and it's supported, but also it's hard to nail it and easy to blow it up. so you should dig into Customize Command Bar or there is a great tool Ribbon Workbench by Scott Durow.
if it was helpful please consider mark it as verified answer
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156