Dynamics 365 CRM added yet another feature which will show the error message and error icon for the editable grid in the unified interface. This error message comes from the Business rule and plugin which will prevent saving of record.
Here we are creating the Business rule to display error message in the header from the editable grid.
We created the business rule that if Primary contact of account entity does not contain data then show error and set scope as ‘Entity’. Next, we activated the Business Rule as shown in the below screenshot:
Now when I set the primary contact as null from the grid and click on the save button shown in the right corner of the screenshot, then it displays the following error message ‘There is at least one error that must be fixed before you can proceed.’ in the header and error icon in the grid as shown in the below screenshot:
When you click on the error icon it shows the error which was set in the business rule message ‘Please enter valid Primary Contact’ as tooltip. Given below is the screenshot for the same.
Thus, with the help of this feature we can easily do the validation and show proper message to users.