getObjectInfo

Use this wire adapter to get metadata about a specific object. The response includes metadata describing the object’s fields, child relationships, record type, and theme.

getObjectInfo uses this User Interface API resource.

Read the data that's returned by the wire adapter using a property or function.

propertyOrFunction—A private property or function that receives the stream of data from the wire service.

  • If a property is decorated with @wire, the results are returned to the property’s data property or error property.
  • If a function is decorated with @wire, the results are returned in an object with a data property and an error property.

To get metadata for a single object, use getObjectInfo. To work with multiple objects, use getObjectInfos.

This example returns the record type Ids and the Id that matches the record type name “Special Account”.

See Compare Base Components for a full example.

See Also