Getting message like Are you sure you want to navigate from the page... in MS CRM 4.0

Answered Getting message like Are you sure you want to navigate from the page... in MS CRM 4.0

  • Friday, 3 August, 2012 6:01 PM
     
     

    Hi,

    I am getting the below message As soon as I open the record and close without doing any modification in MS CRM 4.0.

    'Are you sure you want to navigate away from this page?' and then 'Press OK to continue, or Cancel to stay on the Current page.' Why it is coming ?

    Any help greatly appriciated!!!

    Thanks,

    Srikanth Reddy

All Replies

  • Friday, 3 August, 2012 6:29 PM
     
     
    there are probably some scripts running in the onload events
  • Friday, 3 August, 2012 7:26 PM
     
     

    Thanks for your response, In which case this error will come

  • Saturday, 4 August, 2012 7:57 PM
    Moderator
     
     Answered

    Thanks for your response, In which case this error will come

    This is not an error but notification window.

    This window appears when one of field's value was changed - marked as dirty. Do you have any scripts that run during load of form?


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Follow Andriy on Twitter

  • Monday, 6 August, 2012 2:42 PM
     
     
    Andrill, I am changing the values using ForceSubmit in the OnLoad of the form, is this is the problem for populating the window ?
  • Monday, 6 August, 2012 2:47 PM
    Moderator
     
     Answered

    Yes,

    ForceSubmit marks form as dirty and after this this message appears. In case you don't want this window to appear add following code to your OnLoad event handler:

    crmForm.detachCloseAlert();


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Follow Andriy on Twitter

  • Monday, 6 August, 2012 2:58 PM
     
     
    Thanks a lot Andrill! I have used crmForm.detachCloseAlert(); statement in the OnLoad of the form, Now it's working fine! -:)