Requirement-I need to create a map of custom setting in apex class with fields and value like.
"Name":"test", "cal__c":"tesq", "industry__c":"manu"
how we can get custom setting fields in apex class.is this possible using schema
Requirement-I need to create a map of custom setting in apex class with fields and value like.
"Name":"test", "cal__c":"tesq", "industry__c":"manu"
how we can get custom setting fields in apex class.is this possible using schema
You need to use a describe call for custom settings.
If you have a custom setting named CustomSetting__c then use describe call which will return a map of all the fields :-
Set<String> flds = CustomSetting__c.sObjectType.getDescribe().fields.getMap().keySet();
It will return a set of Field names for the custom setting