Skip to main content

Notifications

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

  • Verified answer
    Charles Abi Khirs Profile Picture
    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
    142 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
    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 the Engage with the Community forum!

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans