How to get all the fields in a Field Set in Salesforce? October 29, 2018June 9, 2022InfallibleTechie Admin Sample Field Set: Sample Code: for ( Schema.FieldSetMember f : SObjectType.Employee__c.FieldSets.Test.getFields() ) { system.debug( f.getFieldPath() ); } Here Employee__c is a Custom Object and Test is the field set name. Output: