You need to sign in to do that
Don't have an account?

Currency error
Hi,
I tried to convert currency value String to decimal type.
String a = '';
Decimal DebitAmount;
a='';
if((a<>null)&&(a<>'')){
DebitAmount = decimal.valueOf(a);
}
system.debug('\n\n String a='+a);
system.debug('\n\n Decimal DebitAmount='+DebitAmount);
And this value I insert to salesforce.
My regular expersion is (\\d*\\,*\\d+.\\d*)
DebitAmount = decimal.valueOf(m.group(1).replace(',',''));
newReceipt.Debit_Amount__c = DebitAmount;
insert newReceipt;
Currency ex: 66,967.78 But after insert the salesforce this value convert to as a rounded value. (66,968). But I want to actual value. Not the rounded value. How can I do it.
Hi,
I want to convert a string s ='144,00' to currency
Please help.
Thanks,