You need to sign in to do that
Don't have an account?
Get the data type, not display type, of a field
I need to access the data types of the fields in an object in order to identify each phone, fax, email, and mail field in an object. I've done this from web services with the DescribeSObject call but the Apex DescribeFieldResult.getType method only return the display typeof the field, not the actual data type. For example, fields that display a Data Type of Fax like in the image below have a display type of Phone according the getType call. I need something that returns fax for fax fields, mail for mail fields, etc. like the DescribeSObject web service call. Does that exist in Apex?
There isn't an email, fax, or phone datatype in Schema.DisplayType and I haven't figured out how to access them in Apex yet. I believe these are just masked String types.
Here are the ones you can use out of the box: