How to use Business Rules to determine Form Type in Dynamics CRM

Introduction

One of the frequent requirement we receive is doing basic form customizations based on Form Type. E.g. Show few fields while creating record and hide those fields once record is saved.

First option which comes in developer’s mind

As we cannot check entity’s form type using Business Rules, we must use JavaScript to achieve this requirement. Hence, usually developer will write a JavaScript method and register an event on Form Load.

This will be time consuming task as compared to the solution which I have explained below. Also, it will need technical person to achieve this requirement, because it involves coding.

An option that usually skips from developer’s mind

As we know, Created On field is populated only when record is created. Also, CRM does not allow to set Created On field to the user, we can take help of this field to determine whether user is on Create form or has opened existing record.

Below screenshot shows how Business Rule can be configured to unlock the Account on Create form and lock it for existing record.

business rule

Simple solution, but we usually miss it.