1.22.2008

Editing the Sitemap in CRM 4.0

I was banging my head on the wall trying to figure out why a simple edit I made to the sitemap in a new CRM 4.0 deployment was not working. The sitemap lets you add or re-arrange the left hand navigation in the main area of CRM. I was trying to move the Service Calendar to the top of this list in the left hand nav. In 4.0 you need to use a new "Titles" element to add a custom title, and, as in 3.0, you can define whether the navigational item shows up based on a user's priveleges in a certain entity. I made a simple change to the sitemap and when I tried to import it, I got the "either the file could not be uploaded or this is not a valid customization file" error. I checked and re-checked my XML and it looked fine.

It wasn't until a co-worker suggested I try moving the "Title" node above the "Privileges" node that CRM let me import the customizations file. I wouldn't have thought the order mattered in this case, but apparently it did.

Here's what DID work:
<SubArea id="ServCal" icon="/_imgs/ico_18_servicecal.gif" url="/sm/home_apptbook.aspx" availableoffline="false">
<Titles>
<Title lcid="1033" title="Scheduling Matrix">
</Titles>
<Privilege entity="activitypointer" privilege="Read">
<Privilege entity="service" privilege="Read">
</SubArea>

Here's what DID NOT work:
<SubArea id="ServCal" icon="/_imgs/ico_18_servicecal.gif" url="/sm/home_apptbook.aspx" availableoffline="false">
<Privilege entity="activitypointer" privilege="Read">
<Privilege entity="service" privilege="Read">

<Titles>
<Title lcid="1033" title="Scheduling Matrix">
</Titles>
</SubArea>

14 comments:

Anonymous said...

is there any way where we can define the user privledges or user role privledges for a site map

Matt Wittemann said...

You can leverage the security roles that users have and refer to them in the Privileges tag in the Sitemap XML. So, for example, if you want to restrict a link in the Sitemap so it is only visible to users with the "Salesperson" role, you might set the privilege tag for users who have write privileges on quotes.

Unknown said...

Do you know if it's possible to add new Area's in the left hand menu?

Matt Wittemann said...

Yes, it's well documented in the SDK on how to add areas and groups in the left-hand navigation. You can download the SDK from: https://www.microsoft.com/downloads/details.aspx?FamilyID=82E632A7-FAF9-41E0-8EC1-A2662AAE9DFB&displaylang=en

Anonymous said...

does the privilege attribute work for the area element? how could one go about selectively hiding service or marketing from certain users?

Matt Wittemann said...

No, unfortunately the privilege attribute doesn't work for the area element in the sitemap. Your options for hiding entire areas from the UI are limited. You can either remove them entirely or you can simply restrict the visibility of their child elements based on security roles (in which case the main Area navigation items will still be visible.)

BinuKumar S said...

i am able to get the url of a saved view. What i need to acheive is i want to link this url to the navigation (ie, the sub area element in sitemap file).

Please help me at the latest about what are the options to acheive this ?

Avner Ottensooser said...

Hi

I am trying to import customisation into our production system and I get an error "Either the file could not be uploaded, or this is not a valid castomisation file.

The prolem is that I can upload the file to the development system and I can upload it to the UAT system but cannot load it to production.

Is this because the production system is updated less often (the import is very different)?

All my ststems are V4.0 UR1

Matt Wittemann said...

Are you exporting/importing the entire customizations.xml or just a part of it like the sitemap? If you're trying to import just the sitemap, and there are custom entities in your dev/UAT environments that are not in your production environment, you might run into this problem. I would try to narrow down where the differences are between your UAT and production environments and try importing one entity at a time to see what part of the customizations XML is giving you a problem.

Anonymous said...

Hi,

Sorry for my sloppy englisch, but I'm from Holland :-)

What I do is keep a production system exactly the same as my testing environment with importing and exporting the customizations.
When I import customizations I always import them seperately. That way I can narrow it down and find which customization is invalid.

good luck!

supreeth said...

Hi
I have developed the Screen in VS 2005 WPF can i know how to bring that screen to MS CRM

Anonymous said...

@supreeth : Most developers use the ISV directory on the server to put their custom ASP.NET applications, otherwise configure IIS with a new Virtual Directory to your app.

Mohit Raghav said...

is there any way that we can add onClick on the Sitemap Item to check whether the user is working on OnlineClinet or OfflineClinet?

Regards,
Mohit Raghav

Matt Wittemann said...

Mohit: There's not an easy way to add jscript to the sitemap, but you can specify different links for different clients. For example, in the node, you can add a "Client" parameter with the values:
- All
- Outlook
- OutlookLaptopClient
- OutlookWorkstationClient
- Web

Create two sitemap subareas (with different ID's) - one with the Client = "Outlook" and one with the Client = "Web" and you can specify different URLs. Each subarea will only show up in the navigation of the appropriate specified client.

 
ICU MSCRM © 2004-2009