Request a topic or
Contact an Arke consultant
404-812-3123
Hiding and Changing Left Navigation Items in CRM 4.0 Entity Screens

Arke Systems Blog

Useful technical and business information straight from Arke.

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009

Hiding and Changing Left Navigation Items in CRM 4.0 Entity Screens

First off, I want to give a big thank you to Jeremy Winchell for writing up the post that got me started in the right direction for this solution.

For those of you that customize Microsoft Dynamics CRM 4.0, like I do, then likely one of the things you repeatedly run into is clients and users that need to have better names for their actions.  Changing these names on the main navigation page relatively simple, but what about on all the other pages, like Contacts, Accounts, etc.?  These, for whatever reason Microsoft had, aren't removable or changeable.  It's a really painful oversight to have to tell a client that even though you have renamed "Products" to "Hardware", they're going to have to remember that it's still going to be "Products" in a few places.  Hopefully the next version of CRM will have the capability to alter and remove these natively, but until then, we'll have to roll our own.

 Warning, the following actions are not supported or even documented by Microsoft.  Use at your own risk.

Now that the disclaimer is out of the way, let's take a look at the meat of the solution.  First, go to the customization area of the Entity you want to change, and open its form view.  In there, click Form Properties and enable JavaScript for the OnLoad action.  The link above has pictures if you're not sure how to get there.

Now you will need the JavaScript:
document.getElementById("%variableName%").style.display = "none"

So in this line, %variableName% is the variable related to the button on the left-hand nav.  “none” will hide this element entirely.  (Also, make sure if you copy and paste that you don’t end up with retarded Word-style quotes.  That happened to me and I spent 10 minutes trying to find a typo in my code)

If you want to change the display name of a button, then you have a bit more work to do.

Again, the JavaScript:
document.getElementById("%variableName%").innerHTML= "<img src=\"%imageLocation%\" /> %displayName%";

Here, you will see that we’re using innerHTML to actually change the content of that button.  Now you don’t have to have the image code in here, but if you leave it out, then your link won’t have an image anymore, and will just be text.  If you want to keep the image, the best thing I have found is to use the IE Dev Toolbar and then look at that button’s properties (to get the IE Dev toolbar on a popup screen, hit Ctrl+N).  You will see the link to the default image there.  This is going to be different for every CRM install, so I have not included it on the table below. Then just change the Display Name with whatever you want the button to actually say, and you’re set!  Note that the quotes around the image location have to be escaped.

Below is a list of the links, their variable names, and their default Title.  From there, making changes to the left nav of any entity in CRM should be simple.   You will see repeats of some.  The reason for that is because MS was not 100% internally consistent in its naming scheme.  For example, Cases is IDed by both navService and navCases, depending on where you are.  For those, I would either try both, or check on the screen itself.

Link

Link ID Name

Default Title

Activities

navActivities

View Activities

Campaign Activities

navCampaignActivities

View Campaign Activities

Campaign Responses

navCampaignResponses

View Campaign Responses

Campaigns

navCampaignsInSFA

View Campaigns

Campaigns

navCampaignsInList

View Campaigns

Cases

navService

View Cases

Cases

navCases

View Cases

Competitors

navComp

View Competitors

Competitors

navComps

View Competitors

Contacts

navContacts

View Contacts

Contacts Excluded

navBulkOperationFailures

View Contacts Excluded

Contacts Selected

navTargetedMembers

View Contacts Selected

Contract Lines

navContractLines

View Contract Lines

Contracts

navContracts

View Contracts

Documents

navDoc

View Documents

E-mail Messages Created

navBulkOperationSuccesses

View E-mail Messages Created

Existing Products

navExistingProducts

View Existing Products

History

navActivityHistory

View History

Information

navInfo

View general information about this record

Invoices

navInvoices

View Invoices

Marketing List Members

navListMember

View Marketing List Members

Marketing Lists

navListsInSFA

View Marketing Lists

More Addresses

navAddresses

More Addresses

Opportunities

navOpps

View Opportunities

Orders

navOrders

View Orders

Other Contacts

navContacts

View Other Contacts

Planning Tasks

navTasks

View Planning Tasks

Price List Items

navPrices

View Price List Items

Products

navProducts

View Products

Quick Campaigns

navMiniCampaignsForList

View QuickCampaigns

Quotes

navQuotes

View Quotes

Related Campaigns

navCampaigns

View Related Campaigns

Relationships

navRelationship

View Relationships

Sales Literature

navCollaterals

View Sales Literature

Sales Literature

navSalesLit

View Sales Literature

Sub-Accounts

navSubAct

View Sub-Accounts

Sub-Contacts

navSubContacts

View Sub-Contacts

Substitutes

navSubs

View Substitutes

Target Marketing Lists

navTargetLists

View Target Marketing Lists

Target Products

navTargetProducts

View Target Products

Workflows

navAsyncOperations

View Workflows

Write-In Products

navWriteInProducts

View Write-In Products

 

So now you should have all the tools you need to customize the Entity Screens into something useful for your clients and users.  And don't forget, if you break something, you can always just delete the JavaScript and start over.

Currently rated 5.0 by 3 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by Wayne Walton on Tuesday, October 14, 2008 2:30 PM
Permalink | Comments (35) | Post RSSRSS comment feed

Related posts

Comments

Dana il

Tuesday, November 04, 2008 10:05 AM

Thanks for your post.
I have added areaactivityhistory & areaactivities as iframes, but I dont success with areabulkoperationsuccesses.
Any idea? I would be great to see the associated emails instead of history/activities.

Starting Business Blog us

Tuesday, November 04, 2008 1:38 PM

Nice post and sharing too.. thanks alot

Rujuta gb

Wednesday, November 12, 2008 12:08 PM

Any idea how to change the "order" of the menu items in the left nav bar?

Thanks

Wayne Walton us

Wednesday, November 19, 2008 12:31 PM

Rujuta, there's a couple ways you can do that. Any custom relationships you make will have a "Display Order" option you can edit. For whatever reason, system-generated relationships don't have editable display orders. In any case, the default value for Display Order is 10,000. Lower numbers are higher on the list, and higher numbers are lower on the list.

That's a pretty simplistic way to do it, and limited in how much you can change. There is another option you can do by taking advantage of the JavaScript above. Just hide every single link and then rebuild them in the order you want displayed. Just by ordering them manually in JavaScript, you should be able to sort them as you wish.

Note: I've not personally tested that before, but I see no reason why it wouldn't work.

Dana, I'm not sure I understand what you mean. Can you expand?

Marc us

Friday, December 19, 2008 7:15 PM

Is there a way to completely remove the sales/service and marketing sections in their entirety from the left nav bar of contacts?

Thanks!

Wayne Walton us

Saturday, December 20, 2008 9:39 AM

Marc, I have not had a chance to test this yet, but I imagine it would work:

1. Open a contact.
2. Press Ctrl+N to open that contact in a new window with all the IE stucc in place.
3. Either manually vuew the source, or use the Internet Explorer Developer Toolbar (www.microsoft.com/.../details.aspx) to find the name/ID of the sections you want to remove.
4. Use my instructions above with that ID to hide them.

You may have to hide each element inside the section as well. As I said, I have not tested those steps personally.

Jeremy Winchell us

Tuesday, December 23, 2008 11:16 PM

Wayne,

Nice job on filling out the rest of the post. I like the table that you included regarding the names of the various links in an CRM Entity.

Jeremy

Marc us

Monday, December 29, 2008 3:00 PM

Thank you Wayne. I had gotten that far, but am still stuck because the Nav Group leaves a nasty ------- top border above the hidden sections.

Thanks for the post, I'll update it if I figure it out.

Wayne Walton us

Tuesday, December 30, 2008 10:47 AM

Jeremy, thanks for the kind words!

Marc, good luck with that one, I've not dived in enough into removing whole sections to be of much assistance further. If I do get a chance, I'll play around and see if there's a better way to hide those areas.

Hersh us

Thursday, January 08, 2009 2:03 PM

Marc, I found this in the comments section of Jim Wangs blog posted by Michel Gueli. Works great!

Code for removing line (Sales):

//Hide horizontal line

var lis = document.getElementsByTagName('LI');

var i = 0;
//Loop through the list items
while (i < lis.length)
{

if(lis[i].getElementsByTagName('A')[0] != null)
{

if (lis[i].getElementsByTagName('A')[0].id == '_NA_SFA')
{

//Replace the DHTML with blank tags
lis[i].outerHTML='';

}
}

i = i + 1;
}

Busby SEO Test us

Monday, January 26, 2009 8:04 AM

That's a pretty simplistic way to do it, and limited in how much you can change. There is another option you can do by taking advantage of the JavaScript above.

blogging tips us

Saturday, April 04, 2009 5:09 AM

you're right Busby,I think that's the best idea.

Tenders gb

Wednesday, April 15, 2009 12:39 PM

Thanks for this solution, better explination than others that ive read.

Dallas movers nl

Sunday, April 26, 2009 6:54 PM

great post

moving pr

Sunday, April 26, 2009 6:54 PM

love your post as usual
made me love u all

burun estetiği

Monday, April 27, 2009 4:12 AM

Hello;
You have done a great work too;
I'd like to congratulate you.
I'm waiting for more work.

tukang nggame

Sunday, May 03, 2009 5:04 AM

Nice posting

sulumits retsambew us

Monday, May 04, 2009 9:02 PM

what a great post, i really like it.

tukang nggame us

Friday, May 08, 2009 4:21 PM

very nice info, thanks.

Bisnis Online us

Thursday, May 14, 2009 9:40 PM

Information is truly extraordinary, I am very interested to read this post

female body builders us

Monday, June 01, 2009 7:50 PM

Thanks for this solution, better explination than others that ive read.

Marc us

Friday, June 05, 2009 6:35 PM

Hey all. It's been a while since I've worked on this but I finally revisited this shelved item and have a good solution:

Try this in your OnLoad event of the form:

//changing left navigation
if(document.getElementById("_NA_SFA") != null)
{
document.getElementById("_NA_SFA").innerHTML =
document.getElementById("_NA_SFA").innerHTML.replace("Sales", "WhatverYouWant");
}
Best of luck-

Marc us

Friday, June 05, 2009 6:38 PM

The following are the values for the major sections:

Details: _NA_Info
Sales: _NA_SFA
Service: _NA_CS
Marketing: _NA_MA

SG my

Monday, June 08, 2009 6:35 AM

I was wondering is there anyway to add a new categories and the iteam in the left navigation menu additional to default 4.

Tukang Nggame us

Monday, June 08, 2009 9:27 AM

great post, thanks for sharing this

Belford High School us

Wednesday, June 10, 2009 4:25 AM

there anyway to add a new categories and the iteam in the left navigation menu additional to default 4.

Rusli Zainal Sang Visioner us

Monday, June 15, 2009 6:04 AM

Thanks for the info. Very helpful !

sulumits retsambew us

Friday, June 19, 2009 8:42 AM

thanks for this nice info.

blogging us

Friday, June 19, 2009 9:39 PM

hi, i am here again. waiting for the next post.

tukang nggame us

Tuesday, June 23, 2009 8:43 AM

thanks, that a good tips. that useful

Stop Dreaming STart action us

Sunday, June 28, 2009 1:43 PM

Nice tips thanks

Sulumits Retsambew us

Sunday, June 28, 2009 1:43 PM

thanks great post

Affordable crm solutions us

Tuesday, June 30, 2009 6:52 AM

I almost always change names for these variables. - Steve

Power Of Conversational Hypnosis us

Thursday, July 02, 2009 10:05 AM

Thank you, very good post

club penguin us

Thursday, July 02, 2009 8:57 PM

I have added areaactivityhistory & areaactivities as iframes, but I dont success with areabulkoperationsuccesses.
Any idea? I would be great to see the associated emails instead of history/activities.

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Friday, July 03, 2009 1:09 AM