serving the solutions day and night

Pages

Sunday, April 28, 2013

Dynamics CRM Application Navigation Using Site Map

The site map is xml included in a solution’s customizations file. Create a solution specifically for site map and application ribbon changes.
<SiteMap>
    <SiteMap>
        <Area>
            <Group>
                <SubArea/>
                    <Privilege/>
                </SubArea>   
            </Group>
        </Area>
    </SiteMap>
</SiteMap>

Use XML Notepad 2007 to edit XML

The default site map that you export does not include any of the following elements: Title, Titles, Description, or Descriptions.  Dynamics CRM doesn’t require these elements for the six default application areas, but they are required for new areas.  The Title, Titles, Description, and Descriptions elements apply to the Area, Group, and SubArea elements.

The Descriptions elements appear only in the Outlook client; the Titles elements appear in both the web and Outlook clients.

http://<crmserver>/<organizationname>/tools/solution/import/SolutionImportWizard.aspx.

Always export the latest site map and create a backup copy before making any edits.

Entity Display Areas



SiteMap Elements
<SiteMap Url=string>
    <Area />
</SiteMap>

Url - For Outlook, Optional

<SiteMap Url="http://sharepoint">

Area Elements
Default 6 Area elements - Workplace, Sales, Marketing, Service, Settings, and Resource Center.
You caan add new, modify, reorder, or remove these areas
If you do not want users to see this area in the application navigation, you should change their security role settings instead of removing the area from the site map.
<Area
  DescriptionResourceId=string
  Icon=string
  Id=string
  ResourceId=string
  ShowGroups=true|false
  Url=string>
  <Titles>
  <Descriptions>
  <Group>
</Area>

Description, DescriptionResourceID, Icon, ResourceId, ShowGroups, Title, Url - Optional
Url - For outlook,
ShowGroups - Controls whether groups of sub-areas are shown in the navigation pane. 
   
<Area Id="Workplace" ResourceId="Area_Workplace" ShowGroups="true" Icon="/_imgs/workplace_24x24.gif" DescriptionResourceId="Workplace_Description" ShowGroups="true">
    <Titles>
      <Title LCID="1033" Title="English WorkPlace"/>
      <Title LCID="1031" Title="German WorkPlace"/>
    </Titles>
    <Descriptions>
      <Description LCID="1033" Description="English WorkPlace Description"/>
      <Description LCID="1031" Description="German WorkPlace Description"/>
    </Descriptions>
</Area>

Group Element
Specifies a group of subareas. Each area can contain multiple groups or none at all.
<Group
 DescriptionResourceId="String"
 Icon="String"
 Id="String"
 IsProfile=["0" | "1" | "true" | "false"]
 ResourceId="String"
 Url="String" >
 <Titles />
 <Descriptions />
 <SubArea />
</Group>

Description, DescriptionResourceID, Icon, ResourceId, Url, IsProfile - Optional
Url - For outlook

File -> Options -> Workplace -> user can select the groups that he wants to see in the Workplace area

IsProfile - true -> Group will display in the Personalize Workplace area
<Group Id="gab_Maintenance" IsProfile="false">
  <Titles>
    <Title LCID="1033" Title="Maintenance" />
  </Titles> 
</Group>

SubArea Element
Each group element can contain multiple SubArea elements or none at all

<SubArea
 AvailableOffline=["0" | "1" | "true" | "false"]
 CheckExtensionProperty="String"
 Client=["All" | "Outlook" | "OutlookLaptopClient" | "OutlookWorkstationClient"  | "Web" ]
 DescriptionResourceId="String"
 Entity="String"
 GetStartedPanePath="String"
 GetStartedPanePathAdmin="String"
 GetStartedPanePathAdminOutlook="String"
 GetStartedPanePathOutlook="String"
 Icon="String"
 Id="String"
 OutlookShortcutIcon="String"
 PassParams=["0" | "1" | "true" | "false"]
 ResourceId="String"
 Sku=["All" | "OnPremise" | "Live" | "SPLA"]
 Url="String">
 <Titles />
 <Descriptions />
 <Privilege/>
</SubArea>

Id - Required, all other attributes are not requried.
AvailableOffline - For Outlook
Client - Specifies whether to display the subarea.
Entity - Specifies the name for the entity. If a Url is not specified, the default view of the specified entity will be displayed.
GetStartedPanePathAdmin - Specifies the path to the Get Started page for this subarea if the user is logged in as an administrator.
PassParams - Specifies whether information about the organization and language context are passed to the URL.
    http://myserver/mypage.aspx   
    http://myserver/mypage.aspx?orgname=AdventureWorksCycle&userlcid=1033&orglcid=1033

Client, Sku - Multiple values can be used as long as they are separated by a comma and do not contain spaces.   
Url - Specifies a URL or HTML Web Resource for a page to display in the main frame of the application when this subarea is selected.

<SubArea Id="nav_import" Icon="/_imgs/area/18_import.gif" Entity="importfile" ResourceId="Homepage_Import"
    DescriptionResourceId="Imports_Description" AvailableOffline="false" GetStartedPanePath="Imports_Web_User_Visor.html"
    GetStartedPanePathAdmin="Imports_Web_Admin_Visor.html" GetStartedPanePathOutlook="Imports_Outlook_User_Visor.html"
    GetStartedPanePathAdminOutlook="Imports_Outlook_Admin_Visor.html">
    <Privilege Entity="import" Privilege="Create" />
</SubArea>

<SubArea
    Icon="/_imgs/area/18_calendar.gif" ResourceId="Homepage_Calendar" Url="/workplace/home_calendar.aspx" Client="Web"
    Id="nav_conts" Entity="contact" DescriptionResourceId="Contact_SubArea_Description"
    GetStartedPanePath="$webresource:dns_html/help_fysearch.htm"
    GetStartedPanePathAdmin="$webresource:dns_html/help_fysearch.htm"
    GetStartedPanePathOutlook="$webresource:sample_/redir.htm?data=help_fysearch.htm"
    GetStartedPanePathAdminOutlook="$webresource:sample_/redir.htm?data=help_fysearch.htm" />

<SubArea Id="dns_navv_EmpSearch" Url="/../ISV/Search/EmpSearch.htm">
    <Titles>
        <Title LCID="1033" Title="Employee Search" />
    </Titles>
    <Privilege Entity="employee" Privilege="Create" />
</SubArea>

<Privilege Entity="employee" Privilege="Create" />
- this link will be visible only user has permission to create employee

Privilege
Optional element, you can include multiple Privilege elements.
By using the Privilege element, you can specify security criteria whether to display a subarea to a user.
Privilege element does not override the Dynamics CRM security settings for custom and system entities.
For example, Read Privilege element for a particular entity in the site map, the Dynamics CRM security settings would not display the subarea to a user who does not have read permissions to that entity.

Settings -> Administration -> Security Roles -> Sales Content Manager -> Product (Create, Read, Write - Green Dot (Organization level)
If Site Map Contains
<Privilege Entity="product" Privilege="Append" />
- CRM would not display, because user doesn't have Append permission

Dynamics CRM security settings always make the final determination on whether to display a subarea to a user.
What is the Privilege element purpose? You can use it to custom web pages, which you cannot do by using the Dynamics CRM security settings.

<Privilege
 Entity=String
 Privilege=[Read|Write|Append|AppendTo|Create|Delete|Share|Assign|All|AllowQuickCampaign|UseInternetMarketing]/>

<Privilege Entity="account" Privilege="Delete, Write"/>

No comments: