3

Is there any way to hide a link in the SiteMap in CRM 2011 using javascript? The link is not that of an entity. It's basically an injected link which opens up a custom HTML page in the dashboard. Is there any way I can probably wire up a javascript function so that the link can be made visible/hidden by invoking that javascript function?

If that is not possible, could there possibly be a workaround for this?

Thanks.

Peter Majeed
  • 5,304
  • 2
  • 32
  • 57
Anupam
  • 1,821
  • 3
  • 23
  • 41

2 Answers2

4

You can restrict users' access to a SubArea by using the Privilege element. If a user doesn't have the right privilege, that SubArea won't show, though this is obviously not something that you trigger programmatically on load.

<SubArea Id="search" Icon="" Url="http://www.dropbox.com">
  <Titles>
    <Title LCID="1033" Title="Dropbox Search" />
  </Titles>
  <Descriptions>
    <Description LCID="1033" Description="Dropbox searching." />
  </Descriptions>
  <Privilege Entity="product" Privilege="Create" />
</SubArea>
Peter Majeed
  • 5,304
  • 2
  • 32
  • 57
1

The sitemap XML documentation doesn't have anything to disable a link based on javascript.

I've ask a somewhat similar question here, with a less than ideal conclusion.. The sitemap is pretty locked down.

If the privilege solution Peter points out is not going to be compatible with your situation, I suppose your HTML web resource will have to handle the blocking in the page's onload event.

Community
  • 1
  • 1
BenPatterson1
  • 1,482
  • 12
  • 15