Change Label Text in the Navigation Pane
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
This sample shows how to modify the default Site Map to change the default label text that is displayed for an area in the Navigation Pane.
In this sample the organization uses the term Support instead of Service. The solution consists of the following steps:
Exporting the Site Map
- In the Navigation Pane, click Settings, click Customization, and then click Export Customizations.
- In the View drop-down, select Client Extensions.
- In the list, select Site Map.
- Click Export Selected Customizations and then click OK to close the notice about information that may be exported.
- Click Save and save the customizations.zip file to a location of your choice.
- Click Close.
Editing the Site Map
- Extract the customizations.xml file that contain your exported Site Map from the customizations.zip file that you exported.
- Open the customizations.xml file and locate the Area that defines the Service area.
- Add the XML Titles element as shown here.
- Save the customizations.xml file
Import the Site Map
- In the Navigation Pane, click Settings, click Customization, and then click Import Customizations.
- Click Browse to locate the modified customizations.xml file.
- Double-click the file or select the file, and then click Open.
- Click Upload.
- Press F5 to reload the application and view the changes.
Always use the technique described earlier to change text in an Area element. For SubArea elements, the correct technique depends on the whether the SubArea has been associated with an entity.
SubAreas associated with Entities
If the SubArea is associated with an entity it will have an Entity attribute associated with the entity name. In this case, the SubArea will automatically show the plural display name for the entity. The correct way to change the text in this case is to change the plural display name for the entity.
For example, the default plural display name for the incident entity is "Cases". So, the following SubArea will display "Cases" as the text.
<SubArea Id="nav_cases" Entity="incident" DescriptionResourceId="Cases_SubArea_Description" …
SubAreas not associated with Entities
Some SubArea elements are not associated with an entity. In this case, use a Titles element to set the appropriate language titles just as you would for an Area.
For example, to change the Service Calendar SubArea in the Services Area to display the text "Support Calendar", apply the following change:
<Area Id="CS" ResourceId="Area_Service" Icon="/_imgs/services_24x24.gif" DescriptionResourceId="Customer_Service_Description"> <Group Id="CS"> <SubArea Id="nav_apptbook" ResourceId="Homepage_AppointmentBook" DescriptionResourceId="AppointmentBook_SubArea_Description" Icon="/_imgs/ico_18_servicecal.gif" Url="/sm/home_apptbook.aspx" AvailableOffline="false"> <Titles> <Title LCID="1033" Title="Support Calendar"/> </Titles> <Privilege Entity="activitypointer" Privilege="Read" /> <Privilege Entity="service" Privilege="Read" /> </SubArea>
Note Removing the ResourceId attribute is not recommended. Any Titles element defined for a language will override the default resource. The Resource will provide text for any valid language.