Updating a Default Associated View

Here is a process for updating your form navigation with a custom navigation link to change the associated view.  Before getting too deep into trying this out, be sure to scroll down to the limitations section, below, to be sure this will support exactly what you’re trying to do.

1. If you are using Microsoft Dynamics CRM 2011 On Premise, then start by making sure you have UR10 (Update Rollup 10) or later installed.  Earlier updates to CRM did not fully support this process.

2. Get the ID of the view you want to use:

    1. Back in CRM, use the SiteMap to go to the child entity that you want to update the view for. 
    2. Bring up the view you want presented on the parent form. 
    3. On the ribbon menu, click Copy a Link | Of Current View.
    4. Within the link, find the portion that starts with viewid=.  It will look something like this (without the highlighting): &viewid=%7bA950954B-9D3B-E111-8CE4-1CC1DEF1E4A9&7d 
    5. Copy the part that I’ve highlighted in red and put it somewhere that you can get back to it easily


3. Make sure that the entity you want to update in you side-navigation area has already been added to the form (you’ll be editing XML code later and it’s a bit more difficult if you have to create a new entry on the form from “scratch”).

4. Create a solution and put only the entity that you want to update into the solution (you do not need to include the child entity that you will be referencing).

5. Export the solution.

6. After exporting it, save a backup copy.  Again, you’ll be editing the XML for the form so you will want to have a backup in case you ever need to backtrack.

7. In the exported solution, there will be a file called customizations.xml.  Open it with a text editor (I recommend NotePad++ or Visual Studio).

8. Search for the term: NavBarByRelationshipItem.  When you get to that section, scroll until you find a segment that reads ‘Text=”[YOUR ENTITY NAME]”’ – this is the section that you’ll want to edit.

9. Update the first line of the section by adding ViewId=”[THE ID YOU GOT IN STEP #2]”.  Once complete, the section will look something like the code below.

   1: <NavBarByRelationshipItem RelationshipName="New_Project_New_Expenses" Id="nav_New_Project_New_Expenses" Area="Marketing" Sequence="1003" ViewId="{A950954B-9D3B-E111-8CE4-1CC1DEF1E4A9}">
   2:   <Titles>
   3:     <Title LCID="1033" Text="Expenses" />
   4:   </Titles>
   5: </NavBarByRelationshipItem>



10. Save the file and, if necessary, put it back into the solution ZIP file.

11. Import and publish the solution.

12. Your side-navigation view on the form should now be updated.


While this process works in some cases, it will not work for everything.  Hopefully Microsoft will address these shortcomings in the future (or, if I’ve missed something here, hopefully someone will post a note to clear it up).  Specifically.

1. This will not work with activity entities of any kind.  For some reason, when you try to use the ActivityPointers view, CRM simply ignores it and does not display a second view of activities (only the default Activities and Closed Activities view).  This is unfortunate because many projects would benefit by having a view of only certain activity records.

2. You cannot use this to create multiple different views of the same child entity.  For example, if you had a single 1:M relationship to contacts and you wanted to display two views such as a view of “Decision Makers” and a view of “Influencers”, you couldn’t accomplish this.  While you could make a copy of the NavBarByRelationship section and use the default ViewId in one and a custom ViewId in the other, the same view would display when you clicked each of the side-nav items.

The Official Documentation

For more information, you can check out the Microsoft Dynamics CRM 2011 SDK reference.  Click here to go the reference page.