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

Leave a Reply

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

WordPress.com Logo

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

Facebook photo

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

Connecting to %s