function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dheeraj shokeenDheeraj shokeen 

"AuraEnabled methods do not support return type of List<Schema.FieldSetMember> How to Fix it inside the LWC

Below the Code
public class DynamicRecordEditFormController {
    @AuraEnabled(cacheable=true)
    public static List<Schema.FieldSetMember> getFields(String fieldSetName, String objectName) {
        Schema.SObjectType sObjectType = Schema.getGlobalDescribe().get(objectName);
        Schema.FieldSet fieldSet = sObjectType.getDescribe().fieldsets.getMap().get(fieldSetName);
        return fieldSet.getFields();
    }
}
Gian Piere VallejosGian Piere Vallejos
Hello,

I think this can help you: https://techdicer.com/field-set-in-apex-lwc-salesforce/ (https://techdicer.com/field-set-in-apex-lwc-salesforce/" target="_blank)
Otherwise, you can use a Wrapper Class too.