+ Start a Discussion

Event setParams not woring if i invoke component from lightning application

openVFpage : function (component, event, helper) {
    var urlEvent = $A.get("e.force:navigateToURL");
    urlEvent.setParams({"url": "https://bondicloud-dev-ed--c.ap1.visual.force.com/apex/ChittySummaryPage"});
the above code component if i invoke through app builder it is working but same component if i invoke with lightning app it throughing error as 
This page has an error. You might just need to refresh it. Action failed: c$URLnavigate$controller$openVFpage [Cannot read property 'setParams' of undefined] Failing descriptor: {c$URLnavigate$controller$openVFpage}

so is it posible to open visualforce page from lightning application?

Akhil AnilAkhil Anil
Lightning events cannot be fired within a Lightning application. You need to include the Lightning component in an app builder or associate the component to a Lightning tab and then test it from there.

Kindly mark it as an answer if that resolves your query !