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.

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 status for details.
  • data
  • error
    • : When status is "error", this property contains details. See error for details.

See Also