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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

javascript wait for save to finish on record creation

(0) ShareShare
ReportReport
Posted on by

Hi,

I am using a java web resource embedded onto a form. the web resource has a button labeled submit. The submit button saves the record thus creating a new record and then tries to update a few fields. what happens is that after i hit submit the page tries to save and while its doing that it also tries to update the fields which in turn causes the fields not to update. I need this done in this order in order for something to work. Is there a way to wait for the  Xrm.Page.data.save() to finish before moving forward in the code? somehow getting a handle to its finish callback?

regards

*This post is locked for comments

I have the same question (0)
  • Verified answer
    ashlega Profile Picture
    34,477 on at

    Hi,

     did you try to use the callbacks?

    msdn.microsoft.com/.../dn481607.aspx;MSPPError=-2147217396#BKMK_dataSave

     Xrm.Page.data.save(saveOptions).then(successCallback, errorCallback);

  • Community Member Profile Picture
    on at

    Thanks just what i needed.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans