0

I have a canvas app inside a utility bar. I would like it to re-render when I change the tab. any suggestion and the canvas app is embedded through aura: component

I have implemented onRecordIdChange which lets me know when the record id is changed from there, I call another controller function

Controller function Code

     var eventHandler = function(response){
        console.log(response);
    };
    var utilityAPI = component.find("utilitybar");
        utilityAPI.getAllUtilityInfo().then(function(response){
    if(typeof response !=='undefined'){

        utilityAPI.getEnclosingUtilityId().then(function(utilityId){

            utilityAPI.onUtilityClick({ 
                eventHandler: eventHandler 
            }).then(function(result){
                console.log('onUtilityClick: eventHandler result: ' + result);
            }).catch(function(error){
                console.log('onUtilityClick: eventHandler error: ' + error);
            });                    
        })
        .catch(function(error){
            console.log('do init: utilId error: ' + error);
        });
    }else{
        console.log('getAll Utility Info is undefined');
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.