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?
1 Answer
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