locked
Getting and Setting Currency datatype in MSCRM 2011 javascript RRS feed

  • Question

  • Hi ,

    How to set Get and Set Currency datatype  in MSCRM 2011 javascript.

    var UnitPrice= Xrm.Page.data.entity.attributes.get("new_unitcost").getValue;

    var totalprice = Xrm.Page.data.entity.attributes.get(new_totalcost");

     totalprice .setValue("1234" ).

    But i am  not getting required result.

    Thanks,

    Abhishek


    Abhishek

    Monday, October 8, 2012 1:45 PM

Answers

  • Hi,

    //to get the value

    var UnitPrice= Xrm.Page.getAttribute("new_unitcost").getValue();

    var totalprice Xrm.Page.getAttribute("new_totalcost").getValue();

    //to set the value

     Xrm.Page.getAttribute("new_totalcost").setValue(1234);


    • Edited by _Vikram Monday, October 8, 2012 1:50 PM
    • Marked as answer by Abhisinha17 Saturday, October 13, 2012 4:04 PM
    Monday, October 8, 2012 1:49 PM

All replies

  • Hi,

    //to get the value

    var UnitPrice= Xrm.Page.getAttribute("new_unitcost").getValue();

    var totalprice Xrm.Page.getAttribute("new_totalcost").getValue();

    //to set the value

     Xrm.Page.getAttribute("new_totalcost").setValue(1234);


    • Edited by _Vikram Monday, October 8, 2012 1:50 PM
    • Marked as answer by Abhisinha17 Saturday, October 13, 2012 4:04 PM
    Monday, October 8, 2012 1:49 PM
  • Can u tell me difference between

    Xrm.Page.data.entity.attributes.get("new_unitcost").getValue

    Xrm.Page.getAttribute("new_totalcost").getValue();

    Abhishek

    Saturday, October 13, 2012 4:30 PM