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 140

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

  • Verified answer
    Charles Abi Khirs Profile Picture
    Charles Abi Khirs 3,569 on at
    RE: Any way to check if a User is navigating away from the form without saving

    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.

  • GPrasanna Profile Picture
    GPrasanna 140 on at
    RE: Any way to check if a User is navigating away from the form without saving

    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.!!!

  • Suggested answer
    Charles Abi Khirs Profile Picture
    Charles Abi Khirs 3,569 on at
    RE: Any way to check if a User is navigating away from the form without saving

    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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans