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.
Use site map editors
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.
Note: Microsoft Dynamics 365 technical support doesn’t provide support for third-party applications.
Programmatically update the site map
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.
Editing the SiteMap manually
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
- 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.
- 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.
- Edit the SiteMap node as required.
- Create a new compressed .zip file, including the extracted solution files and your edited customizations.xml.
- Import the new solutions file.
- In Microsoft Dynamics 365, click Settings, click Customization, and then click Solutions.
- Click Import.
- Click Browse, locate your modified solutions .zip file, click Next, and then click Import.
- When the import is finished, click Close.
- Publish the customizations.
Using SiteMap Designer
Microsoft added a new in-application Site Map editor called the Site Map Designer. This makes editing the Site Map for an application much easier, as it provides a handy drag and drop interface for interacting with the different Site Map elements.
The Site Map can be either edited in the default solution or by importing the Site Map into a custom solution. Once the Site Map is in the desired solution, in the solution explorer navigate to Client Extensions > Site Map. In order to edit the Site Map, either double click the Site Map component or click edit.
Once the Sitemap Designer tool opens you can easily make the necessary adjustments or updates to the SiteMap. With a very similar look, feel and functionality as XrmToolbox the editing tool is familiar and easy to use. Once you are done with your SiteMap configuration, select the Save button and then click the Publish button.
Title, ID, URL, More Titles, More Descriptions, Icon (Area and Sub-Area only)
Type (Dashboard, Entity, Web Resource, URL), Entity (Only usable if type is Entity), URL (Web Resource and URL only), Default Dashboard (Dashboard only), Title, Parameter Passing (Web Resource and URL only).
Publishing your customisations:
Once you’ve made your customisations, you can save and publish the Site Map from within the Designer. The controls for doing this are in the top right hand corner of the screen, and work as advertised. It should be noted, it is not possible to publish the Site Map without first saving it. This area also contains a handy indicator as to whether the Site Map being viewed has been published or is a draft.
The Site Map Designer provides access to all currently published entities. These entities can be added as Sub-Areas to the Site Map. In the below, I’ve added some previously created entities Event and Registration, which have been published from another solution.