Editable grids were a major part of the latest Dynamics 365 release, in this post I will look at their capabilities and show you how to configure in your application.
You may be aware that 2016 release of Dynamics CRM included the ability to enable custom controls for tablets and phones. Including mobile friendly input controls like linear sliders, arc knobs, flip switches etc. If you aren’t aware of these custom controls …. I created this video to highlight their capabilities.
Using Editable Grids
The following features are supported with editable grids;
- In line editing
- Calculated and Rollup Fields
- Run time resize/move columns
- Auto Save / Manual Save
- Toggle between read only and editable grid
- Filtered lookups
- Chart panel interaction
- Command bar interaction
- Business Rules (Including, show error messages, set field value, set business required, set default value, lock or unlock)
The best way to show you editable grids in action is to demonstrate them with a video.
Enable Editable Grids
I’ve already mentioned editable grids are a custom control, you therefore enable them in a similar way as you would for other custom controls.
In customizations navigate to the required entity. Then select the “Controls” tab and the “Add Control…” link.
Next select “Editable Grid” and click Add.
Now you’ll need to select which clients you wish to enable editable grids on. Below you can see that I have selected the web client and the tablet client.
There are some additional properties on editable grids that you may wish to edit. (I will describe these later in this post.) But just adding the grid like this is enough to get it working!
Enable on sub-grids
It’s also possible to enable editable sub-grids on forms. The process is similar to enabling them on “home” grids. Simply navigate to the sub-grid control on the form in customizations, then use the controls option.
You can use the “Add Control….” link as already shown, or if the entity is already enabled for sub grids you and created an editable grid using the settings for the home views as a template.
Once added the options for sub grids are identical to those on the home grids.
A new addition in editable grids is the ability to group results. This feature is enabled by default but can be turned off when required. (Although generally speaking I imagine you’ll leave this feature enabled!)
Below you can see that I can group opportunities by any column on the grid.
To disable grouping simply “tweak” the properties on the editable grid control. Selecting the “edit” icon shown below will allow you to enable / disable grouping.
Notice that this is simply an option to enable or disable the grouping. I don’t have any capability to select which columns are available in the group by drop down.
Lookups on grids can be filtered to only show related record. It is also possible to enable users to override this filtering if required. The example below will show only related contacts in the primary contact field on account.
Selecting the “edit” icon lets us control the properties …
Filtering lookups is by view! When you first select the “Add Lookup” option you’ll need to select the view this lookup will be applied to. Meaning you can have different logic on different views. The example screen shots below related to the “Active Accounts” view, whilst the lookup example below will be applied to the “My Active Accounts” view. This is great in terms of flexibility but if you have the same column repeated on many views you will need to add the lookup option is all of your views.
Firstly, I should remind you that nested grids only apply to the mobile client. (At least in the current release of Dynamics 365!)
It is actually possible to define a nested grid but only have the editable grid available to the web client. This doesn’t create an error but also doesn’t achieve anything!
When defining a nested grid, we have two options to edit! (See below)
The first option we define is to set which entity to open and which view to use. Meaning we can only have one type of nested grid!
Consider accounts, it might be useful to have a nested view of opportunities. In another circumstances a nested view of cases might be more helpful. You can do either but you can’t do both at the same time!
Having defined the entity and view to see in our nested grid we use the “Nested grid parent ID” option to define the binding between our primary entity and the nested entity. In the example of opportunities for accounts, we’d bind to the “parentaccountid” field on the opportunity.
Limitations / Considerations
Some things to consider with editable grids, include;
- Editable Grid version of a sub grid takes up more space than the read only grid (especially if you enable the Group By feature). Allow for a larger sub grid to make sure your users see the same amount of data they used to.
- Enabling editable grids on a home grid is a global setting!
- Enabling editing on a sub grid is a per sub grid basis meaning that every sub grid on every form and dashboard must have their editable setting enabled individually.
Some fields are not editable in the editable grid:
- Fields from related entities
- State, StateCode
- Customer fields (e.g., on an Opportunity or Case)
- Composite fields
- Party List fields (e.g., the To field on an Email)
- Field Level Secure fields (if your field security profile prevents you from editing the field)
- Nested grids only apply to the mobile client.
Editable Grids support entity level business rules for ….
Show error message
Set field value
Set business required
Set default value
Lock or unlock field