Поделиться через


Change application navigation using the SiteMap

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Site map enables you to control the application navigation and other options in Dynamics 365 such as editing labels, adding or changing icons, and adding or changing elements.

In this topic

Application navigation

Configuration options available by using the SiteMap

Application navigation

The SiteMap provides the structure for navigation in Microsoft Dynamics 365. It is evaluated together with your security privileges to display navigation options in the application. If your security privileges do not provide read access to an entity specified in the SiteMap, that navigation option will not be displayed to you. The <Privilege> (SiteMap) element can also be used to specify privilege requirements to view a page that is not related to a specific entity.

To understand the data that defines the application navigation options, compare what you see in the application with the Default SiteMap XML or the customized sitemap element exported from your organization.

Web application navigation bar

The following image shows the web application navigation bar. The default areas shown are SFA ( Sales), CS ( Service), MA ( Marketing), Settings ( Settings), and HLP ( Help Center).

SiteMap shows Areas in Dynamics CRM

Selectable areas appear at the bottom of the navigation bar. When an area is selected, the area displays as the selected area. The most recently used subarea for that area is automatically shown. When the selected area is chosen, the available groups and subareas are displayed as shown in the following image.

SiteMap shows groups and subareas in CRM

In this image, the SFA ( Sales) area is selected and the groups MyWork ( My Work), Customers ( Customers), SFA ( Sales), Collateral ( Collateral), MA ( Marketing), Goals ( Goals), and Tools ( Tools) are visible.

Each group contains a number of subareas. When a subarea is selected, the content defined in the site map for that subarea is displayed below the navigation bar.

Microsoft Dynamics 365 for Outlook navigation

The following diagram shows the Dynamics 365 for Outlook navigation. Microsoft Outlook presents each navigation area in alphabetical order in a tree view instead of using the order specified in the SiteMap. Each person can position the reading pane at the bottom as shown or on the side. They can also hide it. Each entity can be configured to determine whether it will display the reading pane. More information: Editable entity properties

SiteMap in Outlook

Configuration options available by using the SiteMap

The following sections describe common tasks that can be performed by using the SiteMap.

Edit labels

All of the text displayed in the default SiteMap uses a ResourceId attribute to specify the text. You should not change or remove the ResourceId attribute values. If you want to change the label displayed in an element, use the <Titles> (SiteMap) and <Title> (SiteMap) elements to specify the text you want to use for your organization or solution. Any title elements will override the ResourceId attribute values.

Add or change icons

Both <Area> (SiteMap) and <SubArea> (SiteMap) elements have an Icon attribute that you can use to specify the size and other characteristics of the image to display as the icon.

After CRM 2015 SP1, the icons for the <Area> (SiteMap) are 85x71 (width x height) pixel image, white in color, and with 18% opacity. The <SubArea> (SiteMap) menus use 32x32 pixel image as entity icons.

Pixel sizes of the icons in CRM

You should use a GIF, PNG, or JPG image web resource as the source of your icon. When you reference the web resource, make sure that you use the web resource directive ($webresource:). For example, use Icon="$webresource:sample_/icons/MyAreaIcon1.png" when the name of the web resource is “sample_/icons/MyAreaIcon1.png”. Using this directive will create a dependency so that the web resource can’t be deleted as long as your SiteMap element requires it.

Add or remove elements

  • To add elements
    When editing XML elements in the SiteMap, you can to copy and paste existing XML elements to provide an advanced starting point.

    Important

    If you create a new element it must have a unique Id attribute value or importing your solution will fail. You should prepend an appropriate solution publisher customization prefix to the Id value of any new elements that you add.

    More information: Add new pages to an area

  • To remove elements
    Before you remove elements in the SiteMap, consider whether editing the security role privileges for users will achieve your goal. Each <SubArea> (SiteMap) element that is associated with an entity page is evaluated with the user’s privileges and only shown if a user is allowed to view records for that entity.

    If the subarea displays a page, such as a web resource that is not associated with a specific entity, you can add <Privilege> (SiteMap) elements to the subarea to associate that page with privileges for a specific action or access to an entity.

    If none of the subarea elements in a <Group> (SiteMap) or <Area> (SiteMap) can be viewed by a user because of their security privileges, that element will not be displayed.

    If you use the <SubArea> (SiteMap)AvailableOffine attribute to prevent a subarea from being displayed while the Dynamics 365 for Outlook user is working offline, users can still navigate to the subarea but they’ll see a message indicating that the page to display isn’t available offline.

    Note

    We recommend that you use security role privileges to control access to areas of the application.

    If you do not want to edit security roles, you can comment out the node in the SiteMap XML. Commenting out a node is better than deleting it because you can always uncomment the node if you want to restore it in the future.

The Workplace and the Settings areas include multiple groups of links. You can use the <Group> (SiteMap) element in a similar manner to create groups in the other areas. A group element is required, but you must include the <Title> (SiteMap) and <Description> (SiteMap) elements for it to be displayed as a group. Finally, you must edit the <Area> (SiteMap) element to add the ShowGroups attribute and set it to true.

Add new pages to an area

Use <SubArea> (SiteMap) elements to add new pages to an area. If you want to include a grid for an entity, you include a unique ID, specify the entity by using the Entity attribute, and then provide a title and description by using the <Title> (SiteMap) and <Description> (SiteMap) elements.

To display a custom page in the application, you must set the Url attribute instead of the Entity attribute. The Url attribute can reference a page on an external website or an HTML web resource.

When referencing the HTML web resource, make sure that you use the web resource directive ($webresource:). For example, use Icon="$webresource:sample_/Pages/MyCustomPage.htm" when the name of the HTML web resource is “sample_/Pages/MyCustomPage.htm”. Using this directive will create a dependency so that the HTML web resource can’t be deleted as long as your SiteMap element requires it.

Note

To display a Silverlight web resource outside an entity form or chart, create an HTML web resource to be the host page for the Silverlight web resource. Then use the $webresource: directive to open the HTML web resource.

When adding an external page from the SiteMap, it’s a common requirement to pass data in the form of a query string to the page. To pass information about your organization name and the language for the user and organization, use the PassParams attribute. More information: Pass parameters to a URL using the SiteMap

See Also

Customize Microsoft Dynamics 365 applications
Edit the site map
Pass parameters to a URL using the SiteMap
Control access to the Help & Training site
Use the Organization service with Dynamics 365 metadata
Customize entity forms
Customize visualizations and dashboards
Customize entity views
Customize global option sets
Customize commands and the ribbon
Service calendar appearance configuration
Publish customizations
When to edit the customizations file

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright