Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Is supported editing the Customization.XML?

Posted on by

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:

Prevent New... button on lookup controls in model-driven apps - pragmatic development (pragmatic-development.io)

Edit the customizations XML file with schema validation | Microsoft Learn

https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/customize-dev/form-xml-schema?view=op-9-1

  • Verified answer
    Eiken Profile Picture
    Eiken on at
    RE: Is supported editing the Customization.XML?

    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.

  • Suggested answer
    PabloCRP Profile Picture
    PabloCRP 1,086 on at
    RE: Is supported editing the Customization.XML?

    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

  • Lau Costa Profile Picture
    Lau Costa on at
    RE: Is supported editing the Customization.XML?

    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.

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: Is supported editing the Customization.XML?

    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

  • Lau Costa Profile Picture
    Lau Costa on at
    RE: Is supported editing the Customization.XML?

    Thank you for your reply!

    What I want to accomplish is this

    pastedimage1678813381110v2.png

    But I have this

    pastedimage1678813471090v3.png

    So, Ribbon Workbench won't make it work since it is not a command bar button, but instead a button on the lookup field.

  • PabloCRP Profile Picture
    PabloCRP 1,086 on at
    RE: Is supported editing the Customization.XML?

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans