This state manager retrieves metadata about a specific object. The response includes metadata describing the object’s fields, child relationships, record types, and theme.
Syntax
ObjectInfo details depend on only the developer (API) name of the object.
import { LightningElement } from 'lwc';
import smObjectInfo from "lightning/stateManagerObjectInfo";
export default class Example extends LightningElement {
const myObjectInfo = smObjectInfo({
objectApiName: string
});
}
Configuration Functions
setConfig()- : Provide the entire configuration as an object. This function is equivalent to the factory function when you create the state manager.
setObjectApiName()- : Set the object API (developer) name.
State Manager Properties
status- : The current status of the state manager. See
statusfor details.
- : The current status of the state manager. See
data- : When
statusis "loaded", anObjectInfo.
- : When
error- : When
statusis "error", this property contains details. Seeerrorfor details.
- : When
See Also
- getObjectInfo wire adapter
- User Interface API Developer Guide: Get Object Metadata