Welcome to MSDN Blogs Sign in | Join | Help

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

Published Tuesday, February 21, 2006 7:00 AM by Ben Vollmer

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Mitch Milam&#8217;s Microsoft Discussions &raquo; Blog Archive &raquo; Removing Sub-Accounts from the Dynamics CRM 3.0 Account Form

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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.nl
Tuesday, March 21, 2006 5:39 AM by AmonRa

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

To remove opportunities navigation I think you need to use navOpps.
Friday, June 09, 2006 10:50 AM by MattNC

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

ya dijiste como deshabilitarlas, pero como demonios las vuelvo a habilitar .......
Wednesday, September 13, 2006 7:30 PM by lwis

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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

Tuesday, April 03, 2007 6:17 PM by Visha

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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";}

Thursday, July 19, 2007 8:10 AM by Correna Sergent

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

Thanks for the contribution... :-)

Monday, July 23, 2007 7:06 PM by Ben Vollmer

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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

Tuesday, July 24, 2007 7:22 AM by Mr Malcom

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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.

Friday, January 18, 2008 7:29 AM by CLima

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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

but i cannot hide the History entity..

Anybody plz could help me...

Friday, March 21, 2008 4:16 AM by Adi

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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

Quotes = navQuotes

Opportunities = navOpps

History = ?

Sub-Accounts = ?

Thursday, March 27, 2008 6:14 PM by Cory Fellers

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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

Thursday, March 27, 2008 6:55 PM by Ben Vollmer

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

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

Friday, March 28, 2008 3:31 PM by Cory Fellers

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

I like save Sales Orders only if have Contacts and products

navOtrosContactos=document.all.navContacts;

How I can count if navContacts have items

thanks alot

Monday, September 22, 2008 11:50 AM by Katyc

# re: Removing Quotes, Orders and Invoices from the Contact Record with out Security Role Changes

How remove the competitors navigation from opportunity form.

Wednesday, December 31, 2008 5:02 AM by Meenakshi

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker