Please wait, loading...

 

Best Way to use Force Save JavaScript client API in Microsoft dynamics CRM

September 30, 2020

We know how data. save work but in post, we will see how to perform further logic on successful save or failure of function

formContext.data.save(saveOptions).then(successCallback, errorCallback);

We have triggered a function on change of name, once the name is changed javascript will try to force save the form using below client API

 formContext.data.save().then(function() { alert("Successfully Saved "); }, function() { alert("Something Went Wrong"); });
  1. We have a mandatory field on the lead, when we change the name and the mandatory field is empty alert msg will be empty.

  2. If Everything goes fine .then(function() { alert(“Successfully Saved “); }

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

Learn more