Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Issue when replying to an email in CRM

(0) ShareShare
ReportReport
Posted on by

Hi ya'll!

I have a very urgent issue where I get a message prompt when sending an Email reply in CRM. 

The message prompt says: “Your changes have not been saved. To stay on the page so that you can save your changes, click cancel.” However, the email get's sent anyway so it is completely unnecessary and confusing for users. Is there a way to get rid of this? 

I am on Dynamics 365 on-premise. 

Thanks! 

/H

*This post is locked for comments

  • Suggested answer
    Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Issue when replying to an email in CRM

    Hi Henry,

    you will only get this error if any field (even if it's hidden to user) is updated before making the change, so in ASP.net terms if any field on form is dirty (i.e. change by user or script) you will get this error pop up..

    so first thing to identify which field is getting dirty as soon as form gets opened for this entity, you can easily get this by going through method/script provided in following article.

    you can check any fields dirty by running the following code on the browse console.

    var message="The following fields are dirty: \n";
    window.frames[0].Xrm.Page.data.entity.attributes.forEach(function(attribute,index){
    if(attribute.getIsDirty()==true)
    {message+="\u2219 "+attribute.getName()+"\n";}
    });
    alert(message);

     

    once you identify the field check if you are updating them in your Java scripts, if yes you need to change logic to only get update if users updates other relevant fields only.

    other solution is (if you can not do this in javascript) is to remove code in java script and write  plug in and do the same thing in plug in (i.e. update relevant field in post plug in stage)..

    Solution : Add the following code in the page onload

    Xrm.Page.getAttribute("new_description").setSubmitMode(never);

    check Plugin: 

    is there any plugin registered with with entity which makes the fields dirty? is so please check try to deactivate temporarily and check.

    If my suggestion works , please mark it as verified .

  • henrikny Profile Picture
    henrikny on at
    RE: Issue when replying to an email in CRM

    Thanks for the reply!

    There are no custom ribbon buttons or scripts associated with the form because we deactivated them.

    We found out that the 'description' field is dirty, and it seems like there's something that parses through the text and removes the HTML tags. See attached image: 

    Dirty-field.png

    Do you know why this is happening?

  • Suggested answer
    Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Issue when replying to an email in CRM

    Do you have any custom ribbon button on that form. If so , try check the scripts associated. And also check on the dirty fields on the form.

  • henrikny Profile Picture
    henrikny on at
    RE: Issue when replying to an email in CRM

    Yes, but I deactivated them. Any other suggestions?

  • Suggested answer
    Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Issue when replying to an email in CRM

    Is there any business rules on this form? if so can u pls try deactivate and give a try.

  • henrikny Profile Picture
    henrikny on at
    RE: Issue when replying to an email in CRM

    I have disabled all the scripts on the form and I still get the message prompt. Any other suggestions?

  • Suggested answer
    Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Issue when replying to an email in CRM

    Please check your any of the JavaScript for unload or onsave on the form. Mostly these kind of issues are from the custom scripts on the form.

  • Suggested answer
    RE: Issue when replying to an email in CRM

    Please check your any of the JavaScript for unload or onsave on the form. Mostly these kind of issues are from the custom scripts on the form.

  • Aric Levin Profile Picture
    Aric Levin 30,188 Moderator on at
    RE: Issue when replying to an email in CRM

    Hi,

    Are there any changes to the form happening on the Save/Send event?

    You would normally get that if you submitted a Send requests, and changes were done after that on the form.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

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,432 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans