English 中文(简体)
Get the data type, not display type, of a Salesforce.com field from Apex
原标题:

I need to access the data types of the fields in a Salesforce.com object in order to identify each phone, fax, email, and mail field in an object. I ve done this from SFDC web services with the DescribeSObject call but the Apex DescribeFieldResult.getType method only returns the display type of 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 anyone if that exists in Apex?

Field Information

最佳回答

Unfortunately APEX doesn t have that information. That said since you can only define custom phone and email fields and not fax and mail/address fields it s possible to write a definitive list of all fax and mail fields. Thus you might consider hard coding which fields are fax/mail fields and dynamically figuring out which fields are phone and email fields use describeFieldResult.getType() calls.

问题回答

暂无回答




相关问题
Salesforce - Populate text are from drop down selection

I have a picklist with three values and a text area that has three values as well, but I would like to correlate one value from the picklist with one value of the text area. Any thoughts as on how I ...

Setting Timeout value for Salesforce Web Service/API

The API for Salesforce is a web service, you set it up by downloading a WSDL file from Salesforce and adding the WSDL to your .NET project. But I can t find anywhere to set the Timeout value. ...

Salesforce Custom Objects

Hi I am trying to create a Custom Object in Salesforce.com Developer Edition, because I would then like to use this Custom Object in a New Custom Tab say "Properties". Properties tab will contain ...

热门标签