If you’re running Microsoft Dynamics CRM having Update Rollup 1 installed (as of this post), you might have encountered this issue of missing Company Name in Lead System Views. This blog entry attempts to fix this issue. As of now, Microsoft is probably unaware of this and hasn’t mentioned releasing a fix for this in the Update Rollup 2.
Missing Company Name in Lead System Views Issue
If you have Dynamics CRM 2013 with UR1 installed, open up any System View for the “Lead” entity and try to add the column “Company Name” to it. Did you find it? Not really. It’s missing! Although you’re pretty sure you’ve not added it already and it’s not visible in the view as well.
So, where did it go? We will come to the underlying details later as to why you’re unable to find and add it.
However, if you’re lucky enough to have a RTM Dynamics CRM 2013 Organisation, and you try out the exact same thing, you’ve it right there!
Underlying Cause of the Issue
Update Rollup 1 certainly did something unwanted which resulted in this issue. Now what did it do wrong? Well, let’s explore.
First thing we are going to do is create a new solution, add the Lead entity to it and modify one of the System Views like adding a new column. This is just to have the View XML getting added to the customization.xml in the solution. Once done and after publishing, we export and extract the solution to open up the customizations.xml. Now, if we search by cell name=”companyname”, we see something really strange.
The “Company Name” field is already added to the view, having the attribute ishidden=”1″. This is the reason, you’re unable to add “Company Name”, and also still being present it’s hidden which is why you don’t see in the view as well. Well, crazy stuff, huh?!?
Fixing the Issue
Now, since you found this issue, you need to fix it, right? You simply cannot go to your Customer and say “I am sorry to say but you cannot see the Company Name, it’s Microsoft’s fault”. I’ll list down three solutions for this issue. None of these include getting into the database and manually modifying the xml for the View, that’s unsupported.
First Solution: Create a new View for Lead, and you’ll see the “Company Name”. So you can add the field, make it the default view and deactivate the System View.
Second Solution: Create a solution, add the Lead entity and modify the view you want Company Name to be added to (so that it becomes a part of the solution) and export it. Once you have the solution, extract it and open the customizations.xml file. Search for the line as described earlier and simply remove the ishidden=”1″ attribute. Zip up the files again and import them, and you should have your field back.
Third Solution: This is probably the easiest and the one to be used if you want “Company Name” for all your Lead System Views. Create a dummy view by adding the fields you want to see in your System Views. Download the awesome XRM Toolbox, and use the “View Replicator” to replicate your demo view into the System Views.