CRM 2011 JavaScript form types

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();
//Check the State of the Form
switch (Xrm.Page.ui.getFormType()) {
case 1:
{ //New or Create

break;
}
case 2:
{ //Edit or Update

break;
}
}

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

Workflow Elements by Aiden Kaskela

Microsoft Business Solutions MVP (CRM), Contractor, Evangelist

MSDYNAMICSBLOG BY DEEPESH

Real Experiences from Analyzing, Architecting, developing and working with Dynamics CRM, Dynamics 365 and sometimes .net

Mark Margolis's Blog

It's about Software, CRM, Product Development and sometimes Food.

GT // CRM

Gareth Tucker on Microsoft Dynamics CRM

Donna Edwards

Sharing my Journey with Microsoft Dynamics 365

The WordPress.com Blog

The latest news on WordPress.com and the WordPress community.

%d bloggers like this: