How can I update form field on Microsoft CRM Online via Javascript

前端 未结 2 1523
有刺的猬
有刺的猬 2021-01-24 02:08

I\'ve just created a custom order form on the Microsoft Dynamics CRM Online.

Basically, I\'d like to update Total Amount field as multiply of Quantity and Amount Field.

2条回答
  •  逝去的感伤
    2021-01-24 02:38

    Here is info on how to setup the javascript for your forms: microsoft's form programming reference

    the code for your calculation will look something like this:

    var amount = Xrm.Page.getAttribute("youramountfieldname").getValue();
    var quantity = Xrm.Page.getAttribute("yourquantityfieldname").getValue();
    
    var totalamount = amount * quantity;
    Xrm.Page.getAttribute("yourtotalamountfieldname").setValue(totalamount);
    

提交回复
热议问题