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 365 | Integration, Dataverse...
Suggested Answer

Where do I put the Xrm.Page.data.entity.save()?

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am new on Dynamics 365. I want to save data that is captured on one page, I have read that I need to use Xrm.Page.data.entity.save(). Now my problem is that I do not know where to put it on on my page. Can someone please point me to the right direction or show mw how to use it?

Kind Regards

Siyabonga Kubeka

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Hi,

    Yes, you can force a save of your form using JS code.

    To learn how to develop JS scripts for Dynamics forms, I suggest you follow this tutorial: docs.microsoft.com/.../walkthrough-write-your-first-client-script

    Then you can trigger your save with the formContext.data.save() method. You can refer to the following documentation: docs.microsoft.com/.../save

    Also, if you want to cancel the standard save of the form and keep only the save you want to implement, it is recommended to use the preventDefault() function:

    docs.microsoft.com/.../preventdefault

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    You need to use JavaScript coding to call these APIs. You can choose to trigger by adding an event:

    docs.microsoft.com/.../configure-event-handlers-legacy

    Or choose to add a button and add a JavaScript event to trigger.

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Frank Gong

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 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 60 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 51

#3
Satyam Prakash Profile Picture

Satyam Prakash 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans