I'm trying to retrieve recordId and sObjectName from a component put on the utility bar. The point is it always retrieves me 'undefined' in both cases.
<aura:component implements="force:hasRecordId,force:hasSObjectName,flexipage:availableForAllPageTypes"/>
Controller:
doInit : function(component, event, helper) {
console.log(component.get("v.sObjectName"));
console.log(component.get("v.recordId"));
}
Is there something wrong with my code? Or it's just that I can't retrieve it from an utility bar component? And if that's so, how can I fix this?