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.
objectApiName
—(Required) 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’sdata
property orerror
property. - If a function is decorated with
@wire
, the results are returned in an object with adata
property and anerror
property.
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
- Understand the Wire Service
- Handle Errors in Lightning Data Service
- Salesforce Objects Supported by lightning/ui*Api Modules
- Compare Base Components