CRM 4.0 Form.OnSave() causing an error when I am not even saving!

Svar CRM 4.0 Form.OnSave() causing an error when I am not even saving!

  • 13. februar 2009 10:28
     
     
    Here's my scenario:

    I have javascript in the Case.OnSave().  If I open a Case, then straight away click on the X to close it without saving I get an error. (a crash).

    If I disable the Form.OnSave() event code, I do not have this problem.

    Why is it running the OnSave()? 

Alle besvarelser

  • 13. februar 2009 12:51
     
     
    Are you perhaps setting some values on the Case in the OnLoad-phase?
    CRM beginner
  • 13. februar 2009 13:31
     
     
     I am hiding the resolve button in the OnLoad event.  But this works...
  • 13. februar 2009 16:10
     
     
    have you tried the preview in the customization gui to get an error message?
  • 13. februar 2009 16:14
     
     
    Yes, I get an error.

    My question is more "why is it happening when I am not saving?" rather than "why is it erroring?" though.
  • 13. februar 2009 16:20
     
     Svar
    Because you have an open ended comment (/*...) somewhere else or some other clause terminating error that is spilling over you logical boundaries?

    There is no reason to believe that your onSave function is being called out turn due to a Microsoft mistake...yet.
    • Markeret som svar af PGO01 13. februar 2009 17:04
    •  
  • 13. februar 2009 17:05
     
     
    Exactly right - I had commented out a bracket by mistake.

    // }