Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes
If you didn't read yesterday's post, you may be a bit lost on how we got some of the items we are using today. So unless you are a sales person, go back and read yesterdays post.
So in this scenario, we wanted to be able to hide some entities from their related entitites. Thanks for this article goes out to Bill and Tunc from ePartners for the question on how to do it, David McDonald from the Microsoft Federal Team for sharing the idea and Lane from Light Industries on working with me to make sure it actually worked. <BG>
So to use this we are going to open the Contact form under customizations. We are then going to click Form Properties and Select the OnLoad event.
We are then going to paste the following Jscript into the Window:
// This code will remove the Quotes / Order and Invoice items from the nav
// bar on the Contact form.
var navQuotes;
var navOrders;
var navInvoices;
navQuotes = document.all.navQuotes;
navOrders = document.all.navOrders;
navInvoices = document.all.navInvoices;
if (navInvoices != null) { navInvoices.style.display = "none"; }
if (navOrders != null) { navOrders.style.display = "none"; }
if (navQuotes != null) { navQuotes.style.display = "none";}
else {
// error handling here – Q/O/I wasn't found
// alert("No Quotes, Orders or Invoices");
}
Then save your customizations, and publish your changes. So what did we just do?
Here is your contact record before we made any changes.
Here is a blow-up of the left navigation bar for a contact.
Here it is after changes.
And a blow up of left navigation:
Happy demo'ing
Comments
Anonymous
March 01, 2006
PingBack from http://blogs.infinite-x.net/?p=60Anonymous
March 20, 2006
Hi,
It works fine but I also want to get rid of the Opportunities item. I used:
var navOpportunities;
navOpportunities = document.all.navOpportunities;
if (navOpportunities != null) { navOpportunities.style.display = "none"; }
But it doesn't work...
Please contact me @ ramon_k@wieringernieuws.nlAnonymous
June 09, 2006
To remove opportunities navigation I think you need to use navOpps.Anonymous
September 13, 2006
ya dijiste como deshabilitarlas, pero como demonios las vuelvo a habilitar .......Anonymous
April 03, 2007
How about wanting to remove cases from Service and removing the title service by itself?Anonymous
July 19, 2007
Here is the code to remove the Service -> Cases and Contracts // This code will remove the Service Section, //Cases and Contracts items //from the nav bar on the Enttity. var navCases; var navContracts; var navService; navCases = document.all.navService; navContracts = document.all.navContracts; navService = document.all._NA_CS; if (navCases != null) { navCases.style.display = "none";} if (navContracts != null) { navContracts.style.display = "none";} if (navService != null) { navService.style.display = "none";}Anonymous
July 23, 2007
Thanks for the contribution... :-)Anonymous
July 23, 2007
thats nice, but who to remove 'Sales:' word top of tree.Anonymous
January 17, 2008
In the cases you describe, you remove the entire entity from the navigation pane. But in my case, I only want to remove/hide some items of the entity. Example: Remove/hide Products from the Opportunity. What should I do? Thanks in advance.Anonymous
March 20, 2008
Wow!! i already used the code and it works!! but i cannot hide the History entity.. Anybody plz could help me...Anonymous
March 27, 2008
Is there documentation from Microsoft on the names of each of these navigation items? For example: Quotes = navQuotes Opportunities = navOpps History = ? Sub-Accounts = ?Anonymous
March 27, 2008
No. It is not supported.... So use the IE toolbar to get the names and you can use that to hide it.Anonymous
March 28, 2008
Thanks for the suggestion. I threw the page source code into Word and was able to find all the tags.Anonymous
September 22, 2008
I like save Sales Orders only if have Contacts and products navOtrosContactos=document.all.navContacts; How I can count if navContacts have items thanks alotAnonymous
December 30, 2008
How remove the competitors navigation from opportunity form.