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) { = “none”; }
if (navOrders != null) { = “none”; }
if (navQuotes != null) { = “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 (15)

  1. AmonRa says:


    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) { = "none"; }

    But it doesn’t work…

    Please contact me @

  2. MattNC says:

    To remove opportunities navigation I think you need to use navOpps.

  3. lwis says:

    ya dijiste como deshabilitarlas, pero como demonios las vuelvo a habilitar …….

  4. Visha says:

    How about wanting to remove cases from Service and  removing the title service by itself?

  5. Correna Sergent says:

    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)  { = "none";}

    if (navContracts != null)  { = "none";}

    if (navService != null)  { = "none";}

  6. Ben Vollmer says:

    Thanks for the contribution… 🙂

  7. Mr Malcom says:

    thats nice, but who to remove ‘Sales:’ word top of tree.

  8. CLima says:

    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.

  9. Adi says:

    Wow!! i already used the code and it works!!

    but i cannot hide the History entity..

    Anybody plz could help me…

  10. Cory Fellers says:

    Is there documentation from Microsoft on the names of each of these navigation items? For example:

    Quotes = navQuotes

    Opportunities = navOpps

    History = ?

    Sub-Accounts = ?

  11. Ben Vollmer says:

    No. It is not supported…. So use the IE toolbar to get the names and you can use that to hide it.

  12. Cory Fellers says:

    Thanks for the suggestion. I threw the page source code into Word and was able to find all the tags.

  13. Katyc says:

    I like save Sales Orders only if have Contacts and products


    How I can count if navContacts have items

    thanks alot

  14. Meenakshi says:

    How remove the competitors navigation from opportunity form.