Powertrak Blog

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

Posted by Michael Bauer 04/11/2012 Categories: How Tos Microsoft Dynamics CRM

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! Here is the link for the reference to edit the form XML in Microsoft Dynamics CRM, in case anyone is interested.

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 provides CRM extensions certified for Microsoft Dynamics including cloud-based Configure-Price-Quote (CPQ), Visual 2D/3D Product Configurator, and Partner Portal software solutions. Learn how our Powertrak software solutions can help your business today.

[KH1]Hyperlinking
[LDLF2]hyperlinked
By Mani Ramachandran

Comments