locked
What's new ?!! section is showing as field is updated though it's not changed !!! RRS feed

  • Question

  • Hi, 

             In opportunity, probability field update is captured int the what's new wall !! problem is, even if that field is not updated and user makes changes in some other field and save the record , it shows as "probablity field is updated in the wall".. like in this below image...

    Any idea why it's happening ?!! I wish to show the update only if the vale is changed  in the probability field. 



    • Edited by Pradeep47 Tuesday, August 6, 2013 7:23 AM
    Tuesday, August 6, 2013 6:25 AM

Answers

  • You can try something like this to check that the field has actually changed before setting the submit mode:

    if (Xrm.Page.getAttribute("fieldname").getIsDirty()) {
        Xrm.Page.getAttribute("fieldname").setSubmitMode("always");
    }

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by Pradeep47 Tuesday, August 6, 2013 9:34 AM
    Tuesday, August 6, 2013 8:57 AM

All replies

  • Do you have any JavaScript or plugins doing anything with that field?

    If you have JavaScript to setSubmitMode("always"), that field will always be updated when you save the form, even if it has not been modified.

    If you have a plugin setting the probability in an Update, the field will be updated even if the value has not changed.

    In either of these cases the result will be your probability changing from 50% to 50% for example.

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Tuesday, August 6, 2013 7:35 AM
  • Do you have any JavaScript or plugins doing anything with that field?

    If you have JavaScript to setSubmitMode("always"), that field will always be updated when you save the form, even if it has not been modified.

    If you have a plugin setting the probability in an Update, the field will be updated even if the value has not changed.

    In either of these cases the result will be your probability changing from 50% to 50% for example.

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Oh okay. now I get it.. ya we do have setSubmitMode("always"). on save, coz we have made "Probability " Field as Readonly.. it was not saving to database until we made as setSubmitMode("always"). we can't remove it from "on save" either :( !!!

    Any suggestions ??!! we also need this probability to be shown on the what's new section !!

    Thanks

    Tuesday, August 6, 2013 8:50 AM
  • You can try something like this to check that the field has actually changed before setting the submit mode:

    if (Xrm.Page.getAttribute("fieldname").getIsDirty()) {
        Xrm.Page.getAttribute("fieldname").setSubmitMode("always");
    }

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Marked as answer by Pradeep47 Tuesday, August 6, 2013 9:34 AM
    Tuesday, August 6, 2013 8:57 AM
  • You can try something like this to check that the field has actually changed before setting the submit mode:

    if (Xrm.Page.getAttribute("fieldname").getIsDirty()) {
        Xrm.Page.getAttribute("fieldname").setSubmitMode("always");
    }

    Hope that helps

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Awesome !! This works like a charm.. It is saving the data too... :)

    Thanks a lot...

    Tuesday, August 6, 2013 9:36 AM