1

I have code that retrieves the fields in a field set. I can retrieve the fields' labels. However, I want to be able to retrieve the fields' help text. Is there a way to do this?

Schema.FieldSet fs1 = Schema.SObjectType.Event_RSVP__c.fieldSets.getMap().get(selectedFieldSet);
        Map<String,String> fields;
        if(fs1 != null){
            fields = new Map<String,String>();
            List<Schema.FieldSetMember> fsm = fs1.getFields();
            for(Schema.FieldSetMember s : fsm){
                fields.put(s.getLabel(),s.getFieldPath() + '~' + s.getType());
}
        return fields;
}
2
  • 1
    Are you interested in doing this in Visualforce or Lightning? – sfdcfox Mar 10 '19 at 22:16
  • I would like to do this in Lightning. – Michele Kleinhomer Mar 14 '19 at 15:20

Your Answer

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

Browse other questions tagged or ask your own question.