getSaveMode() : Its Return a value telling what was the save event of ms crm entity record ( like is it due to deactivation of form , manual save or save and close etc) below is the full list of events .

// Code
execObj.getEventArgs().getSaveMode();


Event ModeValue
Save1
Save and Close2
Deactivate5
Reactivate6
Send (Email)7
Disqualify (Lead)15
Qualify (Lead)16
Assign (user or team owned entities)47
Save as Completed (Activities)58
Save and New59
AutoSave70
getFormType() :  Its Return a value Telling about form type of ms crm entity record ( Update , or create etc) , below is the full list of events.


// code
Xrm.Page.ui.getFormType();


Form TypeValue
Undefined0
Create1
Update2
Read Only3
Disabled4
Quick Create5
Bulk Edit6
Read Optimized11
Its very usefull when you want to restrict or allow any particular event in ms crm using javascript  .


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