Error: Leave this page or stay on this page error pop up: This is again a random error which user face while working on CRM records via USD applications.
I had added following links: *.dynamics.com, *.live.com, *.microsoft.com to trusted sites but issue is not resolved completely still user face this error on random basis, may be its wrong to put it a USD specific issue.
Regards,
Vaneet Kumar
*This post is locked for comments
Hi Vaneet Kumar,
I am also facing the same issue in USD. Please share the solution.
Hi Sir,
Its extremely had to replicate this error, I would look to the code as suggested by srikanth sir. I agree with you on this - "Maybe your users are seeing these things more when the system is taking longer to save records", It could be one reason. Call Center agents face this error while working on "case" entity record only.
I go through the post link you shared above, post seems to address CRM issue specific to CRM activity only while trying to complete same.
These types of dialogs in USD can be hard to stop. Sometimes they can be simply because something on the form is dirty, often they are related to CRM wanting to close a form as we've marked an activity as complete etc.
But I have also seen timing challenges. (That the save hasn't finished.) As you describe the issues happening "randomly" or spreading like "viral disease" then it could be linked to system performance. Maybe your users are seeing these things more when the system is taking longer to save records.
Your first challenge will be to find an approach to replicate these situations in a test environment. As only then you can start to experiment with options to resolve. Having a good tester helping you in these situations can be invaluable. (FYI: Srikanth worked on a project with me and both can say this type of problem can be a challenge. And our tester really helped us out!)
In my experience these can be quite a challenge to completely remove from your USD experience. But it is possible.
The blog post below does give some pointers of things I have encountered in the past.
Thanks for help, I am looking to the JS which is creating this issue.
Hi
Definitely there is at least 1 dirty field on the form. Follow the below steps to find out what is the dirty field.
1)With in the USD, Click on the Entity form and hit F12 button to open the developer tools (This will obv open outside of the USD), no need to worry abt that.. Note that you have to ensure that the form is ready for keyboard action, that is the reason I have asked to click on the form on the first place.
2)In the developer tools, go to console and select Target as "ClientApiWrapper.aspx" as shown below.
3) Enter the following Javascript in the "command" line as shown and hit the Green color play button.
var attributes = Xrm.Page.data.entity.attributes.get(); for (var i in attributes) { if(attributes[i].getIsDirty()) { alert(attributes[i].getName(); } }
This should show you a JS alert on the corresponding form with the information of "Dirty" fields. Now it is you who need to take a call on how/what made these fields dirty.
Hope this helps !!
Hi Sir, I agree with you, it is wrong to put it as a USD specific issue. There 70 users who works at call center & when one user face "Leave this page or stay on this page" we have notice after few seconds others users also face the same pop up like a viral disease. I had checked this with users they had already saved the page before closing the session or navigate away from the window. This appears to be an issue in the code on the onload of form. Thanks !
Regards,
Vaneet Kumar
Yes Nithya, I had written a post what I did to troubleshoot few errors but some of them is not resolved, hence I made a separate post for seeking the opinion of fellow opinion.
Regards,
Vaneet Kumar
Well this is not an USD issue. This is traditional CRM warning message that will come when you navigate away from the page and there are some unsaved changes are there.
Ask users to save the page before closing the sesion or navigate away from the window. If the users are saying, they havent done any changes then it must be some javascript that you are running onload of the form making the form as dirty and throwing this dialog.
Hi Vaneet Kumar,
Have you already written a blog to troubleshoot this issue?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156