Thursday, February 10, 2011

Number field is always created as Decimal (internal type)

For all custom sObject in Salesforce.com.  Just learned this today:
http://boards.developerforce.com/t5/Apex-Code-Development/Integer-Double-or-Decimal/m-p/202075/highlight/false#M34823

So if you want to use the value in those fields in code for functions as non-decimal argument, a casting member function from Decimal (intvalue, longValue, doubleValue) is always in order, since Decimal sits right at the highest level of the implicit conversion hierarchy.

No comments:

Post a Comment