Top_bottom banner


Get Form type using javascript in CRM 2011 :

When you write Java script/Jscript code on CRM forms, there will be situations where you need to trigger the script only on certain forms. This is how we get the Form Type.
In CRM 2011, there are 7 types of forms are defined.
0 – undefined
1 – Create
2 – Update
3 – Read Only
4 – Disabled
5 – Quick Create (Deprecated)
6 – Bulk Edit
The below script checks the form type and alert if the form type is of ‘Create’ form.
//Get form type
var CREATE_FORM = 1;
var type = Xrm.Page.ui.getFormType();
if(type = CREATE_FORM)
alert(“This is Create Form”);
Hope this helps!

Please share |Like in Facebook if you feel like this page is useful.

Top_bottom banner

About the Author Dynatecon Solutions

DYNATECON is a group of dynamic professionals who are passionate about building affordable IT solutions using Dynamics 365 and Power platform. We focus on enabling digital transformation in Small scale as well as Medium scale industries. Whether you have 1 user or 100 users and planning to implement a new CRM system, please contact us at We can guide you for sure!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s