web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Xrm.Page.data.save().then is not working in CRM 2016 Online environment

(1) ShareShare
ReportReport
Posted on by 4,102

Hi,

I am getting problem while using Save().Then function in MS CRM Dynamics 2016 Version.

 Xrm.Page.data.save().then(thenSuccessFunction, thenErrorFunction);

issue:-

Goes into Errorcallback ..message displayed is as below

errorCode = Xrm.SaveErrorResponse {errorCode: -1, message: "serviceIsBusy", debugMessage: null}.

Appreciate your help.

Note:

1. Form rendering engine is enabled.

2. Form is Quote entity main form.

*This post is locked for comments

I have the same question (0)
  • pavanmanideep Profile Picture
    1,331 on at

    Hi Yadnyesh,

    What operation you were performing on the form before saving the record.

    Usually this fn. (Xrm.Page.data.save().then(thenSuccessFunction, thenErrorFunction);) - Saves the record asynchronously with the option to set callback functions to be executed after the save operation is completed.

  • Yadnyesh Kuvalekar Profile Picture
    4,102 on at

    Hi Pavan,

    Thanks for your response. I am aware of the functionality of this method, but it is not working and is always going in error callback function. I am calling this statement in OnSave event of quote form.

  • Suggested answer
    pavanmanideep Profile Picture
    1,331 on at

    Sorry for the late response, did you try in a different browser, were you still able to reproduce the same error regardless of browser used?

  • Suggested answer
    Bishnu Bhagat Profile Picture
    Microsoft Employee on at

    The same code works fine for me in CRM 2016 online

    Xrm.Page.data.save().then(function(){console.log('Success Callback')},function(){console.log('Error Callback')}); - Gives "Success Callback"

    I doubt you are having some functionalities on Save of the Form which may be causing the Issue. Could you provide some more Info, what you are doing on Save. Disable all you server side code or JS code and check once.

  • Inogic Profile Picture
    760 on at

    Hi Yadnyesh Kuvalekar,

    There might be a chance that your  Xrm.Page.data.save() method would be interfering with  any other script or server side code. Please check for if ,if that is the case.

    Or else you can use below code to perform the same functionality

           // Save the current record

           Xrm.Page.data.entity.save();

           setTimeout(function () {

           // Call the Open Entity Form method and pass through the current entity name and ID after opening the form perform the function you were performing earlier

           Xrm.Utility.openEntityForm(Xrm.Page.data.entity.getEntityName(), Xrm.Page.data.entity.getId());

           }, 3000);

    Hope this will help you.

    Thanks!

    Sam

  • Suggested answer
    Community Member Profile Picture
    on at

    You might calling this function on Save Event that causes this "ServiceIsBusy" message.

    why because OnSave we call Save and it is infinite loop. to solve this you need to find the reason why do you need save function onsave event. for example if you want to refresh the form on save. than what that refresh does exactly, why do you want refresh/load the form? is this because we want to run onload event? then run that event in some other way. Logically it doesn't make sense to call the save function on save event.  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans