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)

Any way to check if a User is navigating away from the form without saving

(0) ShareShare
ReportReport
Posted on by 142

I wanted to check if there is any supported way to do the below scenario.

I have few fields on a form and when the user tries to input the data and doesn't save the form and tries to navigate away from the form I wanted to show a custom message to the user on those field changes and inform user didn't save. i am aware that a default message is displayed but looking for some custom message option.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Charles Abi Khirs Profile Picture
    3,569 on at

    Hi GPrasanna,

    You can use the function Xrm.Page.data.entity.getIsDirty().

    Have a look at this link for more details on how to get if the form is changed and what fields are changed:

    community.dynamics.com/.../identify-dirty-fields-on-microsoft-dynamics-crm-form

    Hope this helps!

    If found helpful, please mark the answer as verified.

    Charles Abi Khirs.

  • GPrasanna Profile Picture
    142 on at

    Thanks Charles ! This helps me. I understand that we can identify the form Dirty fields,but am not sure on what form event I can trigger this . I wanted to check when user moves away from the form. Any help is appreciated.!!!

  • Verified answer
    Charles Abi Khirs Profile Picture
    3,569 on at

    To my knowledge, there are no supported methods other than the standard events the form: onload and onsave, or fields/tabs events.

    Hope this helps!

    Charles Abi Khirs.

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans