Please wait, loading...

 

Get & use Form type using javascript in mscrm 2011 , mscrm 2013 , ms crm 2015

February 21, 2014
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;
// get current TYPE and use it when u what it to run
var formType = Xrm.Page.ui.getFormType();
// if you want to use it on save
if (formType == FORM_TYPE_CREATE) {
}
else {
}


/note: if you want your javascript not to work when saved 1st time and only work on update

if (formType == FORM_TYPE_UPDATE)
  


SOURCE : JUST2CODE.IN
Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/Microsoftdynamics365.png?fit=640%2C651
Microsoft Dynamics Community Profile

Learn more