You need to sign in to do that
Don't have an account?
Krzysztof Kot
Background Utility Item with aura Events for Omni-Channel doesn't work
I have created a component of Events for Omni-Channel (lightning: omniChannelStatusChanged) and when adding it to Utility Items as Background or as normal it does not work. I do not know what the problem may be. I took the code from the documentation. I tested other events but also without results.
component:
<aura:component implements="lightning:backgroundUtilityItem,force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<lightning:omniToolkitAPI aura:id="omniToolkit" />
<aura:handler event="lightning:omniChannelStatusChanged" action="{! c.onStatusChanged }"/>
</aura:component>
js controller:
({
onStatusChanged : function(component, event, helper) {
console.log("Status changed.");
var statusId = event.getParam('statusId');
var channels = event.getParam('channels');
var statusName = event.getParam('statusName');
var statusApiName = event.getParam('statusApiName');
console.log(statusId);
console.log(channels);
console.log(statusName);
console.log(statusApiName);
},
})
component:
<aura:component implements="lightning:backgroundUtilityItem,force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<lightning:omniToolkitAPI aura:id="omniToolkit" />
<aura:handler event="lightning:omniChannelStatusChanged" action="{! c.onStatusChanged }"/>
</aura:component>
js controller:
({
onStatusChanged : function(component, event, helper) {
console.log("Status changed.");
var statusId = event.getParam('statusId');
var channels = event.getParam('channels');
var statusName = event.getParam('statusName');
var statusApiName = event.getParam('statusApiName');
console.log(statusId);
console.log(channels);
console.log(statusName);
console.log(statusApiName);
},
})