On Cpq Editlines page i have added a custom action (Button). Onclick of this button, it will redirect to a visualforce page, inside which my lighting component works. On the lightning component after save I am not able to redirect back to CPQ editlines page. I have use $A.get("e.force:navigateToURL") but this is not working neither giving any error below is the code to fire the event.

var pageUrl = "https://sbqq.ap16.visual.force.com//apex/sbscontrolCaching=1&id="+component.get("v.recordId");
                 var urlEvent = $A.get("e.force:navigateToURL");
                        "url": pageUrl,
                        "isredirect": "true"
  • 2
    Hi and welcome to SFSE. Please could you edit your question to add detail about what happens ("is not working" does not provide enough explanation) and also indicate the context of use (is this in a community or not). It might be helpful if you read How to Ask which provides some help around the best way to go about asking a question to get a good answer (including how to show you've done your research).
    – Phil W
    Mar 11, 2020 at 7:26
  • Whilst it isn't discussing exactly what you are doing, and relates to LWC rather than Aura, you may find the basic approach taken in this answer might help you on your way.
    – Phil W
    Mar 11, 2020 at 7:33
  • In Cpq Editlines page which is a visualforce page, i have added a custom action (Button). Mar 11, 2020 at 7:37
  • You say it doesn't give an error, but just what does happen? What URL does it actually try to take you to? What is the actual URL that works? (btw, hard-coding the URL to the VF page is a bad idea as this won't work without change in a sandbox vs production. You need to use Salesforce APIs to obtain the page URL - something covered in the answer I referenced above.)
    – Phil W
    Mar 11, 2020 at 8:13

1 Answer 1


The reason for this is most of the standard force:* events do not work when the component is opened from a VF page even if you add it as a dependency.

As a workaround use Window.postMessage or Lightning Messaging Service depending on your use case and conditionally show/hide the component on the same page.

I would also recommend you to consider the possibility of completely getting rid of VF pages and directly use an Aura/LWC component

  • 1
    Thank you it worked for me. Mar 11, 2020 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .