SObjectField Class

A Schema.sObjectField object is returned from the field describe result using the getControler and getSObjectField methods.

Namespace

Schema

Example

Schema.DescribeFieldResult F = Account.Industry.getDescribe();
Schema.sObjectField T = F.getSObjectField();

sObjectField Methods

The following are instance methods for sObjectField.

getDescribe()

Returns the describe field result for this field.

Signature

public Schema.DescribeFieldResult getDescribe()

Return Value

Type: Schema.DescribeFieldResult

getDescribe(options)

Returns the describe field result for this field. This method also provides an option to get all the describe field results for an object.

Signature

public Schema.DescribeFieldResult getDescribe(Object options)

Parameters

options
Type: Object
Use this parameter to pass FieldDescribeOptions.FULL_DESCRIBE when a subset of system objects could have different results for picklist values based on the context they're invoked in. This parameter computes all aspects of describe field results.

For example, AIConversationContext.PersonType field is a picklist that contains a list of accessible object types.

Return Value

Type: Schema.DescribeFieldResult