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