Michael Philip's Blog

Writing about MS Tech with strong focus on Azure & CRM

MS CRM 2011 – Using JavaScript to identify if a form is in Create or Update or other states.

Leave a comment

var FORM_TYPE_CREATE = 1;

var FORM_TYPE_UPDATE = 2;

var FORM_TYPE_READ_ONLY = 3;

var FORM_TYPE_DISABLED = 4;

var FORM_TYPE_QUICK_CREATE = 5;

var FORM_TYPE_BULK_EDIT = 6;

var formType = Xrm.Page.ui.getFormType();
if (formType == FORM_TYPE_CREATE) {

}

else {

}

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s