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

Field sets in apex


On Account Object we have 4 field sets. In apex, i need to query all the fieldsets and get the value of each field and dispay on VF page.

In the below syntax, we have to mention the FS name which i dont want.
List<Schema.FieldSetMember> fields = Schema.SObjectType.Account.fieldSets.getMap().get('field_set_name').getFields();

Using this i am able to get all the field sets under an Account,
 Map<String, Schema.FieldSet> FsMap = Schema.SObjectType.Account.fieldSets.getMap();
But now , need to query on Account with the fields under the field sets where order id  = 'xya' and type ='abc'