1({2 handleGetAllUtilityInfo : function(component, event, helper){3 var utilityBarAPI = component.find("utilitybar");4 utilityBarAPI.getAllUtilityInfo().then(function(response){5 var myUtilityInfo = response[0];6 utilityBarAPI.openUtility({7 utilityId: myUtilityInfo.id8});9})10 .catch(function(error){11 console.log(error);12});13}14})
Response
For both LWC and Aura Components, this method returns a promise that resolves to an array of utilityInfo objects, containing the following fields. The promise is rejected on error.
Name
Type
Description
id
string
The ID of the utility.
isLoaded
boolean
Whether the utility is loaded.
utilityLabel
string
The label of the utility.
utilityIcon
string
The SLDS icon ID of the utility’s icon.
utilityIconVariant
string
The SLDS icon variant of the utility’s icon.
utilityHighlighted
boolean
Whether the utility is highlighted.
utilityVisible
boolean
Whether the utility is visible.
utilityPoppedOut
boolean
Whether the utility is popped out.
panelHeaderLabel
string
The label of the utility panel.
panelHeaderIcon
string
The SLDS icon ID of the utility panel’s icon.
panelHeaderIconVariant
string
The SLDS icon variant of the utility panel’s icon.