0

I want a list of field names (List of Strings) for a custom setting, something like we get in Schema.DescribeFieldResult. Any suggestion how to do it?

3

Describe Information works just fine for custom settings.

If you have a custom setting named mySetting__c then:

Set<String> flds = mySetting__c.sObjectType.getDescribe().fields.getMap().keySet();

will return a set of Field names for the custom setting

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.