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

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Where do I put the Xrm.Page.data.entity.save()?

    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

  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at
    RE: Where do I put the Xrm.Page.data.entity.save()?

    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

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Adis Profile Picture

Adis 136 Super User 2025 Season 1

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 81

#3
Jonas "Jones" Melgaard Profile Picture

Jonas "Jones" Melgaard 77 Super User 2025 Season 1

Product updates

Dynamics 365 release plans