setUtilityLabel() for Lightning Experience
Sets the label of a utility. This text is displayed in the utility bar. This method isn’t supported for Lightning Web Components (LWC).
For LWC usage, see updateUtility() for Lightning Experience.
| Name | Type | Description |
|---|---|---|
utilityId | string | The ID of the utility of which to set the label. Optional when called within a utility. |
label | string | The label of the utility displayed in the utility bar. |
This component, when added to a single-column Lightning page used in a utility bar, sets the label of the utility to “My Favorite Utility” when the button is pressed.
Component code:
Controller code:
This method returns a promise that, upon success, resolves to true.