function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GYAN ANDRUSGYAN ANDRUS 

can anyone please help me for this Invalid Decimal: 100 in apex class

I am reading csv file using apex class ,,I am getting error as Invalid Decimal

 Amount  = csvRecordData[0];
             System.debug('The Amount value is : '+Amount );
             
             Decimal decVal = Decimal.ValueOf(Amount);
             accObj.Transaction_Amount__c = decVal;
             
            System.debug('The value issssssssssssssssss: ' +decVal);
                         
             acclist.add(accObj);  
Amit Chaudhary 8Amit Chaudhary 8
Try to update your code like below
Amount  =  Decimal.ValueOf(csvRecordData[0]);
             System.debug('The Amount value is : '+Amount );
             Decimal decVal = Decimal.ValueOf(Amount);
             accObj.Transaction_Amount__c = decVal;
			 System.debug('The value issssssssssssssssss: ' +decVal);
             acclist.add(accObj);