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
BhmBhm 

how to get the API name of particular field ?

Hi,

how to get the api name of particular field, and what are the methods to get the apiname, and also i need to display csv file  columes with apiname fields.

 

Thanks.

Bhawani SharmaBhawani Sharma
You can use describe method to get the API name.
Map<String, Schema.SObjectField> M = Schema.SObjectType.Account.fields.getMap();

Key is fields API Name
Avidev9Avidev9
I guess you have to use SObject Describe.

I will suggest you to go through this link http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_describe_objects_understanding.htm