Edit the site map
Updated: November 29, 2016
Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online
You can edit default or app-specific site maps in any of the following ways:
Using the new SiteMap designer introduced in December 2016 update for Dynamics 365 (online and on-premises) or a third-party site map editor if you are using an earlier version of Microsoft Dynamics 365.
Programmatically updating the SiteMap entity record to update the XML in the SiteMap.SiteMapXml attribute.
Manually editing the XML in the SiteMap node in the customizations.xml file of an exported unmanaged solution and then by importing the solution as managed or unmanaged.
If you are using December 2016 update for Dynamics 365 (online and on-premises), use the new SiteMap designer to create and manage site maps. More information: Create a site map for the app
Otherwise, you can use one of the third-party site map editors to edit the default site map. As app-specific site maps are introduced in December 2016 update for Dynamics 365 (online and on-premises), third-party site map editors might not work as expected for editing site maps for business apps. A popular sitemap editor for editing default site maps is included in the Toolbox for Dynamics CRM 2011/2013 released by Microsoft Dynamics 365 MVP Tanguy Touzard.
While these applications streamline the process to edit the site map, they still require that you have some understanding of the site map XML schema. For more information, see SiteMap XML reference.
Microsoft Dynamics 365 technical support doesn’t provide support for third-party applications. If you have questions about these applications, contact the application publisher.
Retrieve the SiteMap entity record that you want to update, and then update the XML in the SiteMap.SiteMapXml attribute of the record. Make sure you have understanding of the site map XML schema before you edit the XML. For more information, see SiteMap XML reference.
When you update a SiteMap record programmatically using the Update method, the site map XML that you specify will overwrite the existing XML in the SiteMap.SiteMapXml attribute of the record.
You can manually edit the SiteMap node in the customizations.xml file of an exported unmanaged solution and then import it back in Dynamics 365 to update the site map. Depending on whether you are importing an unmanaged or managed solution decides how the SiteMap record is updated.
Importing an unmanaged solution overwrites the existing site map XML in the SiteMap record.
Importing a managed solution creates a new SiteMap record with the latest changes, and the SiteMap.OverwriteTime attribute value of the latest/active SiteMap record is set to the default value of the DateTime field (1900-01-01 00:00:00.000). The SiteMap.OverwriteTime attribute value of the existing SiteMap record is set to the datetime value when it was updated.
To edit the site map
Click Settings, click Customizations, and then click Solutions.
Add the default or app-specific site maps to a new or existing unmanaged solution. In the solution, select Client Extensions from the list of Components on the left. Select Add Existing, and then select Site Map. From the list of site maps:
To add the default site map, select Site Map.
To add an app-specific site map, select a custom business app site map . The dialog box displays site maps for all the custom business apps that you have access to. For example, in this case, you can select Contoso Sales App or Contoso Service App.
The app-specific site maps display only if you have December 2016 update for Dynamics 365 (online and on-premises) or later and have custom business apps in your Dynamics 365 instance. You can also select multiple app-specific site maps and default site map to be added to the same solution.
Click OK in the Select solution components screen.
Click Save to save changes to your solution.
Click Export Solution and follow steps in the solution export wizard to export the solution.
After the solution is exported, extract the files from the compressed .zip file.
Keep the compressed .zip file as your backup.
In the customizations.xml file, locate the:
SiteMap node under ImportExportXml/SiteMap to edit the default site map.
SiteMap node under ImportExportXml/AppModuleSiteMaps/AppModuleSiteMap to edit the app-specific site map.
If you added multiple app-specific site maps in a solution before exporting the solution, you can use the SiteMapUniqueName and SiteMapName nodes under ImportExportXml/AppModuleSiteMaps/AppModuleSiteMap to determine the SiteMap node in the customizations.xml file that you should edit for your app site map.
Edit the SiteMap node as required.
Editing XML is much easier if you use an editor that provides schema validation. For more information, see Editing with schema validation.
Create a new compressed .zip file, including the extracted solution files and your edited customizations.xml.
In Windows Explorer, select all the files. Then right-click and select Send To and Compressed (zipped) folder.
Import the new solutions file.
In Microsoft Dynamics 365, click Settings, click Customization, and then click Solutions.
Click Browse, locate your modified solutions .zip file, click Next, and then click Import.
When the import is finished, click Close.
Publish the customizations.
If you don’t see the changes right away, refresh your browser page.
For a better experience, edit the customizations.xml file with an application that can use schema validation to provide IntelliSense support. For more information, see Edit the customizations XML file with schema validation.
When you add a URL to the site map that includes the ampersand character (&), you must encode it by replacing it with “&”. XML validation fails if you don’t encode this character and you won’t be able to import the solution. For example:
<SubArea Id="new_customSubArea" Url="http://mysite/mypage.aspx?parameter1=value&parameter2=value ">
<SubArea Id="new_customSubArea" Url="http://mysite/mypage.aspx?parameter1=value¶meter2=value">
The solution import tool performs validations on the site map. If errors occur, the default site map is applied and an error message is displayed. You must fix the errors in the site map and import it again. However, it’s still possible that some errors might occur.
Some errors that you might encounter when running a custom business app after manually editing/importing the custom business app site map are:
Site map with no subarea
Site map has subareas, but user does not have the privileges to see them
Invalid entity (not a legal Dynamics 365 entity name)
Site map has dashboard node, but no dashboard selected in the modular business app definition
Microsoft Dynamics 365
© 2016 Microsoft. All rights reserved. Copyright