lightning/stateManagerObjectInfo

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.

1import { LightningElement } from 'lwc';
2import smObjectInfo from "lightning/stateManagerObjectInfo";
3
4export default class Example extends LightningElement {
5
6  const myObjectInfo = smObjectInfo({
7    objectApiName: string
8  });
9}

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 status for details.

data

When status is "loaded", an ObjectInfo.

error

When status is "error", this property contains details. See error for details.

See Also