getEnclosingUtilityId() for Lightning Experience
Returns the ID of the enclosing utility, or false if not within a utility. This method isn’t supported for Lightning Web Components (LWC).
For LWC usage, see EnclosingUtilityId context wire adapter.
None.
This component has a button that, when pressed, retrieves the enclosing utility’s ID.
Component code:
Controller code:
This method returns a promise that, upon success, resolves to the utilityId of the enclosing utility or false if not within a utility.