$ObjectType

A global merge field type to use when referencing standard or custom objects (such as Accounts, Cases, or Opportunities) and the values of their fields.

Usage 

Use dot notation to specify an object, such as {!$ObjectType.Case}.

Optionally, select a field on that object using the following syntax: {!$ObjectType.Role_Limit__c.Fields.Limit__c}.

Example 

This example retrieves the label for the Account Name field:

1{!$ObjectType.Account.Fields.Name.Label}

You can also use dynamic references to retrieve information about an object through $ObjectType. For example, {!$ObjectType.Account.Fields['Name'].Type}

  • Object Schema Details Available Using $ObjectType

    Use the $ObjectType global variable to access schema information about the objects in your organization. For example, to access the name, label, and accessibility of an object.

  • Field Schema Details Available Using $ObjectType

    The $ObjectType global variable provides access to a variety of schema information about the objects in your organization. Use it to reference names, labels, and data types of fields on an object, for example.

See Also