Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Utility Bar API Method Parity
The utility bar API provides methods for Aura Components and Lightning Web Components
(LWC) in Lightning Experience only. Salesforce Classic isn’t supported.
This table shows how the LWC methods map to Aura Components methods. Both can interoperate on the same page. We recommend using LWC to build user interfaces using modern web standards.
Methods for Utility Bars
| Utility Bar Methods for LWC | Utility Bar Methods for Aura Components |
|---|---|
| enableModal() | toggleModalMode() |
| enablePopout() | disableUtilityPopOut() |
| getAllUtilityInfo() | Same as LWC. |
| getInfo() | getUtilityInfo() |
| minimize() | minimizeUtility() |
| onUtilityClick() | Same as LWC. |
| open() | openUtility() |
| updatePanel() | Update a utility panel using one or more of these methods. |
| updateUtility() | Update a utility using one or more of these methods. |
| EnclosingUtilityId context wire adapter | getEnclosingUtilityId() |
Utility Bar API Considerations
Consider these additional guidelines.
- For LWC, the utilityId parameter is always required. For Aura Components, utilityId can be optional if it’s called from within a utility.
- For LWC, to retrieve the record context from a component in a utility, use the CurrentPageReference wire adapter. For Aura Components, implement the force:hasRecordId interface on your custom component.
- The isUtilityPoppedOut() Aura Components method doesn’t have an LWC equivalent. You can use the getAllUtilityInfo() method to retrieve the same information.