Hiding Sidebar Navigation (Related Entities)
Hi Guys,
Recently for a client, we had to create some many-to-1 relationship from Contact to Accounts & Opportunities. We then had the problem of the related entity navigation on the side showing up. They didn’t want to see all these related navigations. I added some onLoad code on the contact form to hide the Sidebar navigation.
Before:
The key is to get the relationship Elementid from the source code of the page (Press Ctrl + N to open new window, then click on the ‘view’ menu and click ’source’). Then find the Name of the Navigation and find the element id:
onLoad code:
document.getElementById("nav_new_contact_account_dm1").style.display = "none";
document.getElementById("nav_new_contact_account_dm2").style.display = "none";
document.getElementById("nav_new_contact_account_dm3").style.display = "none";
document.getElementById("nav_new_contact_account_dm4").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm1").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm2").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm3").style.display = "none";
document.getElementById("nav_new_contact_opportunity_dm4").style.display = "none";
After:
I hope this helps you all and gives you some idea of how powerful JavaScript & CRM are.
-MSCRM Person



Recent Comments