Welcome to MSDN Blogs Sign in | Join | Help

East Region Microsoft CRM Blog

This Blog is focused on Microsoft CRM. It specalizes in news for CRM partners and customers, customization tools for demos and local events in the Microsoft East Region.

News

  • Welcome to the Mid-Atlantic CRM Blog, formerly owned and operated by Ben Vollmer, a CRM legend ;). My name is Chris Kahl and Ben has asked me to take over the care and feeding of this most valuable resource. Like Ben, my job is to help partners and customers with Microsoft CRM in the Eastern US. This blog is a great and searchable information source. Feel free to subscribe to the RSS feed to stay current with Dynamics CRM. Any tools discussed here are for DEMO only. You should NOT use these in a production environment unless you test them. Microsoft Support DOES NOT support these tools. Everything here is provided as-is with no warranty.
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

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

Comments

AmonRa said:

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
# March 21, 2006 5:39 AM

MattNC said:

To remove opportunities navigation I think you need to use navOpps.
# June 9, 2006 10:50 AM

lwis said:

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

Visha said:

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

# April 3, 2007 6:17 PM

Correna Sergent said:

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

# July 19, 2007 8:10 AM

Ben Vollmer said:

Thanks for the contribution... :-)

# July 23, 2007 7:06 PM

Mr Malcom said:

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

# July 24, 2007 7:22 AM

CLima said:

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.

# January 18, 2008 7:29 AM

Adi said:

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

but i cannot hide the History entity..

Anybody plz could help me...

# March 21, 2008 4:16 AM

Cory Fellers said:

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

Quotes = navQuotes

Opportunities = navOpps

History = ?

Sub-Accounts = ?

# March 27, 2008 6:14 PM

Ben Vollmer said:

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

# March 27, 2008 6:55 PM

Cory Fellers said:

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

# March 28, 2008 3:31 PM

Katyc said:

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

# September 22, 2008 11:50 AM

Meenakshi said:

How remove the competitors navigation from opportunity form.

# December 31, 2008 5:02 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

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

Page view tracker