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.
| Parameter Name | Type | Description | Required? |
|---|---|---|---|
objectApiName | String | The API name of a supported object. | ![]() |
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’sdataproperty orerrorproperty. - If a function is decorated with
@wire, the results are returned in an object with adataproperty and anerrorproperty.
data—Object Infoerror—FetchResponse
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
