I am rendering a Visualforce Page in the call center for my salesforce CTI. On this Visualforce Page, i am rendering a lightening component.
In this lightening component i am using lightning:navigation
, to navigate and open the detail pages of Case/Contact, when needed
In my component i have defined lightning:navigation
like this -
<lightning:navigation aura:id="navService" />
To open the pages, i am using it like this in the controller -
var navService = params.component.find('navService');
var pageReference = {
type: 'standard__recordPage',
attributes: {
actionName: 'view',
recordId: payload.id,
},
};
navService.navigate(pageReference);
This code works fine for navigation if i render this lightening component directly somewhere.
But when i render this component in a Visualforce Page, then this navigation does not work. There is no error or api calls in network.
I understand this might be happening because the Visualforce Page renders in an iframe, so now the lightening component is rendering in an iframe. So in that case, is there a way to navigate to another page in a VisualForce page?
Please help.