I want to navigate two urls one after another using lightning component code,I am in Lightning Experience,I want to go Classic printable view page
My tried code:
Component:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:attribute name="recordId" type="String" />
<div>
<div>
<lightning:button label="Print" onclick="{!c.navigate}" class="print-hide" />
</div>
</div>
</aura:component>
Controller:
({
navigate : function(component, event, helper) {
}
})
Helper:
({
navigate : function(component, event, helper) {
var printoption = component.get("v.recordId");
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url":'https://domainname/ltng/switcher?destination=classic'
});
urlEvent.fire();
urlEvent.setParams({
"url":'https://domainname'+printoption+'/p?retURL=/'+printoption
});
urlEvent.fire();
}
})
How to Navigate two urls at the same time one after another using lightning component code?