Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Microsoft USD Application Issue : Leave this page or stay on this page error pop up

Posted on by

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.

87768.png

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

  • BALU Gajjala Profile Picture
    BALU Gajjala on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    Hi Vaneet Kumar,

    I am also facing the same issue in USD. Please share the solution.

  • Vaneet Kumar Profile Picture
    Vaneet Kumar on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    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.

  • Verified answer
    Neil Parkhurst Profile Picture
    Neil Parkhurst 10,725 User Group Leader on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    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.

    neilparkhurst.com/.../usd-prevent-close-window-dialog

  • Vaneet Kumar Profile Picture
    Vaneet Kumar on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    Thanks for help, I am looking to the JS which is creating this issue.

  • Verified answer
    ansrikanth Profile Picture
    ansrikanth 3,115 on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    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.

    3348.2.PNG

    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();
    	}
        }


    3348.2.PNG

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

  • Suggested answer
    Vaneet Kumar Profile Picture
    Vaneet Kumar on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    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

  • Vaneet Kumar Profile Picture
    Vaneet Kumar on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    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

  • Verified answer
    ansrikanth Profile Picture
    ansrikanth 3,115 on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    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.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Microsoft USD Application Issue : Leave this page or stay on this page error pop up

    Hi Vaneet Kumar,

    Have you already written a blog to troubleshoot this issue?

    community.dynamics.com/.../220399

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans