save form Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/save-form/ Microsoft Dynamics CRM . Microsoft Power Platform Tue, 29 Sep 2020 19:08:22 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/cropped-Microsoftdynamics365-blogs.png?fit=32%2C32 save form Archives - Microsoft Dynamics 365 Blog http://microsoftdynamics.in/tag/save-form/ 32 32 176351444 Best Way to use Force Save JavaScript client API in Microsoft dynamics CRM http://microsoftdynamics.in/2020/09/30/best-way-to-use-force-save-javascript-client-api-in-microsoft-dynamics-crm/ Tue, 29 Sep 2020 19:08:22 +0000 http://microsoftdynamics.in/?p=4207 The post Best Way to use Force Save JavaScript client API in Microsoft dynamics CRM appeared first on Microsoft Dynamics 365 Blog.

]]>

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 “); }

The post Best Way to use Force Save JavaScript client API in Microsoft dynamics CRM appeared first on Microsoft Dynamics 365 Blog.

]]>
4207