Created
December 5, 2014 14:50
-
-
Save mtetlow/3cc4551173a263022d16 to your computer and use it in GitHub Desktop.
example of field describes to get a field name
This file contains hidden or 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
Schema.DescribeSObjectResult d = Schema.getGlobalDescribe().get('Task').getDescribe(); | |
Map<String,sObjectField> fields = d.fields.getMap(); | |
for (String f : fields.keyset() ) { | |
Schema.DescribeFieldResult dfr = fields.get(f).getDescribe(); | |
//system.debug(JSON.serialize(dfr)); | |
system.debug(dfr.Name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment