How to add a Navigation Link in a Microsoft Dynamics CRM 2011 form

The only way to add a navigation link in Microsoft Dynamics CRM 4.0 is to edit the xml to add a <NavBarItem> node. In Microsoft Dynamics CRM 2011, in addition to messing with the xml, the form ui can be used to modify the navigation pane. But if you want to enable the PassParams option, you will still need to export the solution, manually edit the customizations.xml file, zip it up and reimport.

When I first started adding navigation links in xml, the following snippet for <NavBarItem> which I used in CRM 4.0, would work in crm 2011 too. It goes under Entity / FormXml/ Navigation/ NavBar.

1
2
3
4
5
<NavBarItem Id="test" Area="Info" Icon="$webresource:new_Enterprise_Contacts_icon" Url="<url>" PassParams="1" Sequence="9600">
<Titles>
<Title LCID="1033" Text="Test Link" />
</Titles>
</NavBarItem>

 

How to add navigation links in xml

When I tried that last week, the same <NavBarItem> did not display the new navigation link. To see what was different, I manually added a link using the Form UI, exported the solution, unzipped it and opened the customizations.xml file. If you notice the xml piece below, there is a new attribute called solutionaction, with the value of Added.

1
2
3
4
5
<NavBarItem Id="test" Area="Info" Icon="$webresource:new_Enterprise_Contacts_icon" Url="<url>" Sequence="9600" solutionaction="Added">
<Titles>
<Title LCID="1033" Text="Test Link" />
</Titles>
</NavBarItem>

 

That being the only difference, I updated my xml snippet to add the solutionaction attribute, and created a new <NavBarItem> element. Notice that the PassParams has been set to yes.

1
2
3
4
5
<NavBarItem Id="test" Area="Info" Icon="$webresource:new_Enterprise_Contacts_icon" Url="<url>" PassParams="1" Sequence="9600" solutionaction="Added">
<Titles>
<Title LCID="1033" Text="My Test Link" />
</Titles>
</NavBarItem>

 

With the above in my customizations file, the imported solution has the 2 navigation links, “test Link” that was created using the UI, and “My Test Link” created by editing the customizations.xml file.

Adding Navigation Links in CRM

The interesting thing is that the definition for the navigation item that displays in a form does not specify the solutionaction attribute. But when it is not part of the xml, the nav link does not display at all! 

If this does not resolve the issue, feel free to contact us or email us at Support@axonom.com for more help!

Looking to enhance your Microsoft Dynamics CRM with powerful sales and customer relationship management tools? Axonom develops cloud-based CPQ solutions, such as guided selling, visual 2D and 3D Product Configurator, partner portals, and more. Learn how Powertrak software solutions can help your business today.

[KH1]Hyperlinking
[LDLF2]hyperlinked
By Mani Ramachandran