Created
May 14, 2019 21:46
-
-
Save SalesforceBobLightning/90a097af3863adadd088da7dc735a692 to your computer and use it in GitHub Desktop.
Get Salesforce SObject fields using Apex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String sObjectName = 'FlowInterview'; // change this | |
Map<String, SObjectField> fields = Schema.getGlobalDescribe().get(sObjectName).getDescribe().fields.getMap(); | |
for(String key : fields.keySet()) { | |
System.debug(fields.get(key)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment