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

List of all field labels and names for all objects

Is there an easy way to pull just a list of all the fields that your currently have in Salesforce for custom and standard objects?  I would need the field labels and the field names.


I'm not interested in pulling all the data, just the fields.




Take a look at describeSObjects().


Hope that helps,


I was able to get all that information from the wsdl file for our organization. It has been an indespensible tool in creating queries and knowing what kind of data to expect in return.


   hope this help you



Map<String, Schema.SObjectField> mapFields = Schema.getGlobalDescribe().get(selectedValue).getDescribe().fields.getMap();

List<String> sortedKeyset = new List<String>();

for (String fieldName: mapFields.keyset()){



thanks man, this is great help.

Madeleine WongMadeleine Wong
Hi! Is this something that someone who doesn't know anything about coding could do? I am looking to find a list of all my fields for my standard and custom objects, but don't know how to code! Any help would be great, thanks!
raghavender manne 3raghavender manne 3
This code snippet gives you the complete list of custom settings, Custom objects in a salesforce org , once  we have the custom object we can dig in to the details the object

 integer countCustomObjects =0;
 integer countCustomSettings =0;
   for(Schema.SObjectType objTyp : Schema.getGlobalDescribe().Values()){
            //custom setting
            system.debug('Number '+countCustomSettings +' and Name is: '+objTyp.getDescribe().getLabel());
            //custom object
           system.debug('Number '+countCustomObjects +' and Name is: '+objTyp.getDescribe().getLabel());
 system.debug('Total number of Custom objects is '+countCustomObjects);
 system.debug('Total number of Custom Settings is '+countCustomSettings);
Shubham Bangad 4Shubham Bangad 4
Really helpful!
Kim SheehanKim Sheehan
I too am not a code developer.  I find it simplest to go to Setup, open the object's Fields. Select from the top of the list to the bottom, and paste it into an Excel sheet.  Remove the hyperlinks with a simple command and you have a pretty well-formatted document.
Chris FederspielChris Federspiel This nailed it for me. Report on entity definition + field label. Be sure to filter baloney like 'history', 'feed', 'sharing','change' on the entity definition object, field is 'developer name', operator: does not contain.

I'm using it to add language labels for our managed packages