Activity Forums Salesforce® Discussions Differentiate between Schema.FieldSet and Schema.FieldSetMember in Salesforce?

  • Deepak

    Member
    August 29, 2019 at 12:05 pm

    Schema.FieldSet

    You can use dynamic bindings to display field sets on your Visualforce pages. A field set is a grouping of fields. For example, you could have a field set that contains fields describing a user's first name, middle name, last name, and business title. If the page is added to a managed package, administrators can add, remove, or reorder fields in a field set to modify the fields presented on the Visualforce page without modifying any code. Field sets are available for Visualforce pages on API version 21.0 or above. You can have up to 50 field sets referenced on a single page. A Salesforce org can have up to 500 field sets.

    Schema.FieldSetMember

    Contains methods for accessing the metadata for field set member fields

    Use the methods in the Schema.FieldSetMember class to get details about fields contained within a field set, such as the field label, type, a dynamic SOQL-ready field path, and so on. The following example shows how to get a collection of field set member describe result objects for a specific field set on an sObject:

    List<Schema.FieldSetMember> fields =
    Schema.SObjectType.Account.fieldSets.getMap().get('field_set_name').getFields();

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos