function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
drs-medrs-me 

create utility bar programmatically

Currently, if you write an email in lightning experience, you have a button to open the composer in a sort of utility bar.
How can we programmatically do this in a custom component?
Raj VakatiRaj Vakati

Please refer this links .. 

https://salesforce.stackexchange.com/questions/178173/detecting-utility-bar-in-lightning-component

https://agarciaodeian.com/2016/12/31/my-first-lightning-component-on-utility-bar-via-eclipse/

https://www.salesforceben.com/add-utility-bar-salesforce-lightning-apps/
https://salesforcesidekick.com/2017/02/13/maximizing-productivity-with-the-utility-bar/


Sample cmp
 
<aura:component implements="flexipage:availableForAllPageTypes" access="global">
    <!-- attributes -->
    <lightning:utilityBarAPI aura:id="utilitybar" />
    <aura:attribute name="hasUtilityBar" type="Boolean" default="false" />

    <!-- event handlers -->
    <aura:handler name="init" value="{! this }" action="{! c.init }" />

    <p>Is there a utility bar? {! v.hasUtilityBar ? 'Yes' : 'No' }</p>
</aura:component>
 
({
    init: function (component, event, helper) {
        var utilityAPI = component.find('utilitybar');

        utilityAPI.getAllUtilityInfo().then(function (response) {
            if (typeof response !== 'undefined') {
                component.set('v.hasUtilityBar', true);
            } else {
                component.set('v.hasUtilityBar', false);
            }
        });
    }
});