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.
Read Full Post »