locked
how to update total amount field in Opportunity in CRM 2013 RRS feed

  • Question

  • Hi,

    I have a currency field named "Service charges" in Opportunity. I want to update Total Amount but field is locked by default. Is it possible to update field?

    I used this script

    function addService()
    {

    var total=Xrm.Page.getAttribute("totalamount").getValue();
    var Service=Xrm.Page.getAttribute("new_servicecharges").getValue();
    var amount=total+Service;
    Xrm.Page.getAttribute("totalamount").setValue(amount);
    }


    • Edited by Aamir Hijazi Wednesday, December 24, 2014 12:08 PM
    Wednesday, December 24, 2014 12:01 PM

Answers

All replies

  • Yes, It will work
    Wednesday, December 24, 2014 12:33 PM
  • But Total amount value remain unchanged. :(
    Wednesday, December 24, 2014 3:48 PM
  • Hello,

    You can't add custom field value to total field, there is OOB server side logic that will overwrite your value, if you want to use your custom field for calculation you need to create custom total field and need to use this total field in all of your opportunity view,reports,charts etc.


    Microsoft Dynamics CRM Training|Our Blog | Follow US | Our Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    • Proposed as answer by HIMBAPModerator Thursday, December 25, 2014 6:30 AM
    Thursday, December 25, 2014 6:30 AM
    Moderator
  • You can not update your field like you describe, because your user have no rights to change the value in this field.

    You can update it on save with plugin or you can run process, witch will update it.

    Thursday, December 25, 2014 6:52 AM
  • I have created process for update total amount field but unfortunately its not working. Please tell me what should I do for update Total Amount field? I just want to set custom field value on Total Amount field. Please help me out
    Friday, December 26, 2014 5:27 AM
  • As I said in my earlier reply you can't do that total amount field is not available for update, we have done this in multiple time, if you want to add some custom value to total amount you need to create your custom field.

    Check this your your reference: http://msdn.microsoft.com/en-us/library/gg328229(v=crm.5).aspx

    https://community.dynamics.com/crm/f/117/t/138118.aspx

     

    Microsoft Dynamics CRM Training|Our Blog | Follow US | Our Facebook Page | Microsoft Dynamics CRM 2011 Application Design
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Friday, December 26, 2014 6:33 AM
    Moderator