I'm trying to Navigate to an edit page of a specific record which is part of a line item (list of records displayed) on a Lightning component which is embedded as a VF page on detail page of a standard object.

force:navigateToURL does not work as it comes from an embedded VF page. e.force doesn't work either.

I tried URLFOR, but unable to get $Action.Lead to work on the Lightning component.

Code details : The VF page embedded on the detail page of a Lead layout uses the following code format:

<apex:page standardController="Lead">
    <apex:includeLightning />

    <div id="lightning" />

        $Lightning.use("c:RelatedLists", function() {
          { objectId : '{!Lead.Id}'
          function(cmp) {


Lets say your displaying a list of leads in the c:RelatedListsComponent and for each lead I want to add an edit ui:button/ ui:outputURL on clicking it should redirect the user to the edit page of the specific lead that was clicked on.

As mentioned, earlier methods don't work because this component comes from an embedded VF page.

Also, a little bit about what I'm trying to develop: A generic custom related list using the Lightning Components, so for reference you can look at the existing standard related list in Lightning User experience, this is only for lightning and not the classic salesforce related list.

You can see how there is an arrow next to each record on the related list, clicking which gives the drop down, and the 'Edit' and 'Delete' button, I'm stuck at this part where I can not implement the Edit functionality. Edit Button drop down

  • The good way to get most out of this community is post some code ,show some screenshots on what you are expecting and whats not working .Please add in details .Thanks Feb 10, 2016 at 22:55
  • try javascript .if it helps. Feb 11, 2016 at 2:24

2 Answers 2


force:navigateToURL doesn't work in a VF. You need to use sforce.one.navigateToURL.

  • I meant to say "sforce.one.navigateToURL" , was a typo, and it doesn't work
    – Sham PTC
    Feb 22, 2016 at 21:32

Use url creation in JS as we used to do in classic UI, good thing about lightning is it recognizes the classic UI URLs

You must log in to answer this question.

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