Opportunity Product onchange event causes error on Opportunity

שאלה Opportunity Product onchange event causes error on Opportunity

  • Wednesday, February 20, 2013 1:49 AM
     
     

    I want to save the opportunity product form onchange of Quantity field. Here is the code:

    function SaveForm_onchange(){

    Xrm.Page.data.entity.save();

    }

    When I run, it throws a generic error on the Opportunity entity.  Closing the error message allows the Opportunity Product entity to save.  Any ideas?


    Ken Compter

All Replies

  • Wednesday, February 20, 2013 2:20 AM
    Moderator
     
     

    I don't think that by itself should be causing an error (it didn't when I tried anyway). Do you have any other scripts or plugins running on either entity?

    You might try seeing if you can get a more detailed error message.

    • Hit F12 for the IE Developer Tools
    • Script tab (left side)
    • Start Debugging
    • F5 on the line item (if it didn't automatically reload)
    • Console tab (right side)
    • Change the quantity and see if an error message appears

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn