Microsoft Dynamics® CRM Training
Sub-Grids in Flow Forms
An error occurred while loading the video. Please try again.
The new flow forms introduced in the December 2012 Service Update for Microsoft Dynamics CRM offer users a smooth, process-driven form experience. While these forms look different than the old forms, the manner in which they are configured is virtually the same. To illustrate this, we will insert a sub-grid into the body of a flow form.
The first thing I want to do is open an Opportunity record. When the new flow form opens, I see three sub-grids on the right. These are discussed in greater detail in the lesson, “Collaborative Sub-Grids”. What I like about these grids is their location. They are immediately visible, and they don’t take up too much screen real estate. What allows this to happen, and what the flow forms do so well, is the three-column layout.
While the old forms support up to four columns, they seem to function best in a two-column layout. I must emphasize that this is subjective; you may find a four-column form to be quite effective. However, in general, and by default in most scenarios, the old forms are set up in a two-column layout.
Since the flow forms make great use of space by minimizing the navigation pane by default, a three-column setup looks natural, uncluttered, and it allows more information to be displayed in a single location.
Let’s now open a Contact record and see how the flow form is set up for this entity by default. When the record opens, I see that it also follows the three-column setup. It does not however have any sub-grids. Say a large portion of my business is customer service oriented. I might find that a sub-grid that displays my Contacts’ open related Cases would be quite helpful. This information can be located by maximizing the navigation pane, but I want it available as soon as the record opens. The sub-grid will also give me a nice additional feature that you will see later in the lesson. What I need to do is open the Form Editor, which I can find in the command bar.
When the Form Editor opens, notice that it resembles the old form rather than the new form. Don’t worry, this is in fact the flow form, it’s just that currently, the Form Editor resembles the old form no matter which form is being configured.
I see that the body of the form is already configured for a three-column setup; it is a two column layout, where one column is configured to hold two additional columns, resulting in a total of three. To add a sub-grid that matches the layout of the ones we saw in the Opportunity record, that is, a small grid on the right side of the form, all I have to do is first, know what I want the sub-grid to display, and second, simply insert it into the established framework of the form.
I click the Insert tab of the ribbon, and then click Sub-Grid, which opens the List or Chart Properties dialog. Remember, I want this to display open Cases related to this customer. I’ll name it “OpenCases”; no spaces can be in the name. You may have noticed that the labels for the sub-grids in the Opportunity record were in all caps. That is not a default formatting setting; the labels were entered in all caps. I like how that looks on the form, so I’ll do the same for this grid. I will give it a Label of “OPEN CASES”, and then check the Display label on the Form box.
In the Data Source section, I specify where the records will come from that will make up this list. In the Records dropdown, I select “Only Related Records”, since I only want Cases related to this customer. In the Entity dropdown, I select “Cases (Customer)”, and in the Default View I select “Active Cases”. I could further edit the filter criteria by clicking the Edit button, but I don’t need to since it’s already specified in these three fields.
I’ve set the properties to the necessary settings, so I can now click the OK button. The dialog closes and I am back at the Form Editor. I can now drag the sub-grid to where I want it on the form. Remember, I would like it to be on the right side of the form, so I place it between the Anniversary and Personal Notes fields.
I like the new setup, so I click the Home tab of the ribbon, click Save, and then Publish. Once the customizations are published, I can close out of the Form Editor and reopen the record. When the Contact opens, I see the Open Cases sub-grid I just added. Remember when I said this sub-grid will give us another feature? What’s great about this is not only can I see related Case records on the form, but I can create a new one by clicking the add icon that now appears next to the grid.
Forms in Dynamics CRM are highly customizable; I can create a new one from scratch and design every aspect of it. However, using the default forms allows me to make simple configurations and implement them quickly. If I spend time with the default forms and identify what I like, I can leverage the existing framework to enhance the qualities I find most beneficial, just like this sub-grid.
For more tips, tricks, and tutorials, please refer to the Success Portal or our xRM.com blog.