Tuesday, October 29, 2013

Context Sensitive Sub-Grid Commands In CRM 2013

So remember back in CRM 2011 when you could click on an item in a sub-grid and the items displayed in the ribbon would reflect the entity that was selected? This changes a bit in CRM 2013. Instead of the ribbon, we have the command bar and it does not change context when selecting an item from a sub-grid. Obviously this is a pretty important piece of functionality so luckily we can still get pretty close to the same effect it just takes an extra click.

I should also point out that with a vanilla CRM 2013 organization, some of the navigation that you might have been used to in CRM 2011 isn't displayed in quite the same way. For example look at the relationship between Opportunity and Quote. On the CRM 2013 Opportunity form there is a Quote sub-grid displayed but all you can do is add a new Quote or open an existing Quote. From the sub-grid you can't select a Quote and print a report, run a workflow, etc...

1

We know that the items that used to be in the left navigation in CRM 2011 now appear in the top navigation when you select the arrow to the right of the record. In this case, Quotes is not displayed.

2

In order to fix the navigation and get on track to being able to perform an action on one or more sub-grid items we need to go into the form editor (this ends up working the same way as it did in CRM 2011). Select Navigation from the ribbon here and you'll see the fields on the right column turn into related entities. Drag Quotes from the right side to the left side and place it in the area/order you want to be displayed in. Don't forget to Save and Publish.

3

When you refresh the record we should have 2 changes. First the navigation should now display Quotes. The second is that on top of the sub-grid of Quotes, we have another icon that looks like a square with some lines.

4

Selecting this icon or Quotes from the navigation replaces the record content with the associated view of Quotes in the main area of the screen. Here now we have the option to select one or more items from the list and perform an action.

5

Key point is that in order to get the additional icon on the top of the sub-grid you will need to have the relationship displayed in the navigation.