locked
CRM 4: value was either too large or too small for a decimal error RRS feed

  • Question

  • Hi all,

     

    I was trying some money fields using Javascript and onSave event

    but everytime I'm trying to save the record the following error ocurred:

    "value was either too large or too small for a decimal error"

     

    please advise

    Wednesday, July 13, 2011 2:52 PM

Answers

  • Guys, I did it !!!

     

    It was all about a validation problem, cause I was performing some calculations before updating the field so I have to check that I'm not dividing by zero

    Thursday, July 14, 2011 10:33 AM

All replies

  • Hi,

    Can you please provide the code you are trying in onSave event and in which entity?


    Krunal Doshi
    Wednesday, July 13, 2011 3:43 PM
  • Hi,

          Please ensure the value being passed to a particular decimal attribute value is in between the range of the decimal number, Also you can try saving the number by converting the number to Number property and save the record. Please let me know if this is helpful for you.

     

    Regards,

    Vishnu.

    http://osmosee.wordpress.com


    Regards, Vishnu. http://www.osmosys.asia http://osmosee.wordpress.com
    Wednesday, July 13, 2011 5:20 PM
  • Dears,

     

    I've updated a customized money field in quote product entity through the onsave event of the parent quote using the crmservice update message and java script, as follow:

     

    //quote retrieve message here
    		for(i=0; i < results.length; i++)
    		{        if(results[i].selectSingleNode('./q1:new_moneyfield1')!=null)
    				  arr1[i]=results[i].selectSingleNode('./q1:new_moneyfield1').nodeTypedValue;
            else
              arr1[i]=0;
    //quote product update message here
    }
    
    

    I'm sorry but the code is too large and it's a little bit confusing, but I hope the above is quite enough

    Wednesday, July 13, 2011 7:08 PM
  • Any suggestions ??
    Thursday, July 14, 2011 9:25 AM
  • Guys, I did it !!!

     

    It was all about a validation problem, cause I was performing some calculations before updating the field so I have to check that I'm not dividing by zero

    Thursday, July 14, 2011 10:33 AM
  • Dear Andriy,

     

    As you can see, it's me who solved the problem, accordingly it's my post that should be marked as answer

     

    thanks

    Friday, July 15, 2011 9:48 AM