Monday, September 24, 2007

Hiding links from the left pane of an entity

When we log in to CRM what we see is the application navigation area. This can be modified using site map xml file. but the tricky thing is when it comes to entity navigation pane we cannot use the site map. we have to use the ISV.Config file or use javascripts at the from onload event.

For a project that we are currently doing we have used javascripts to hide the unwanted links when the entity form is loading. The thing is the links are getting hidden after the form is getting loaded, hence the user is able to see some of the items when the form is loading. But as people say something is better then nothing. this was a blessing in disguise to us.

Please keep in mind you need to get the id's of the the links that you need to hide after they gets rendered to the page. you can open up a new form with this facility by clicking ctrl+N button and a new page will be opened of the form with the view source functionality.

i was abled to find this solution from microsoft.crm developer community. i cant remember the link. but would like to say "thanks guys for publishing the solution".

you can use the following javascript to hide the unwanted links.
var LeftBar = new Array() ;
LeftBar [0] = "navHistory";
LeftBar [1] = "navContacts";
LeftBar [2] = "navMoreAddresses";
for (i=0;i
{
try
{
document.getElementById(myLeftBar[i]).style.display='none';
}
catch(err)
{}
}

No comments:

Post a Comment

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...