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)

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

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