Newer Version Available
FieldSetMember Class
Namespace
Usage
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:
If you know the name of the field set in advance, you can access its fields more
directly using an explicit reference to the field
set:
FieldSetMember Methods
The following are methods for FieldSetMember. All are instance methods.
getDBRequired()
Returns true if the field is required by the
field’s definition in its sObject, otherwise, false.
Signature
public Boolean getDBRequired()
Return Value
Type: Boolean
getFieldPath()
Returns a field path string in a format ready to be used in a dynamic SOQL
query.
Signature
public String getFieldPath()
Return Value
Type: String
Example
See Displaying a Field Set on a Visualforce Page for an example of how to use this method.
getLabel()
Returns the text label that’s displayed next to the field in the Salesforce user interface.
Signature
public String getLabel()
Return Value
Type: String