I am facing below issue ,while prepopulating some field values in a quick action(alternate of URL hacking in classic) Unable to redirect to Record detail page ,which is created on saving quick action( which is being called from extension controller of VF page using QuickAction.QuickActionRequest class) Please suggest if anyone has implemented the same.\ Please find the code as below: VF page:

<apex:page standardcontroller="Account" extensions="QuickActionRequestContact">
     <apex:includeLightning />

                                    console.log("Inside lightning out");
                                    alert("Inside ltng:out");

    <apex:pageblock title="createContact" >
         <apex:commandButton   value="createContact" action="{!createContact}" Rerender="mycon"/>


<aura:application access="GLOBAL" extends="ltng:outApp" >
    <aura:dependency resource="c:NavigationPageref"/>


public class QuickActionRequestContact 
    ApexPages.StandardController ctrl;
    Account acc;

    public QuickActionRequestContact(ApexPages.StandardController c) // Extension constructor
        ctrl = c;
        acc = (Account)c.getRecord();
    public static pagereference createContact()
         String myRecId = ApexPages.currentPage().getParameters().get('Id');

        QuickAction.QuickActionRequest req = new QuickAction.QuickActionRequest();
        // Some quick action name
        req.quickActionName = Schema.Account.QuickAction.Create_Contact_Standard; 

        // Define a record for the quick action to create
        Contact c = new Contact(); 
        c.lastname = 'last name';
        req.record = c; 

        // Provide the context ID (or parent ID). In this case, it is an Account record.
        req.contextid = myRecId;

        QuickAction.QuickActionResult res = QuickAction.performQuickAction(req);
        return null;


Navigation component:

<aura:component implements="flexipage:availableForAllPageTypes,force:hasRecordId">
    <aura:attribute name="recordId" type="String"/>
     <aura:attribute name="url" type="String"/>
    Welcome to Navigation
     <aura:handler name="init" value="{!this}" action="{!c.goToRec}"/>
     <lightning:navigation aura:id="navLink"/>


 goToRec : function(component, event, helper) {
        var navLink = component.find("navLink");
        var pageRef = {
            type: 'standard__recordPage',
            attributes: {
                actionName: 'view',
                objectApiName: 'Contact',

        navLink.navigate(pageRef, true);

1 Answer 1


The lightning:navigation component is supported in

Lightning Experience, Salesforce Mobile App

This means it is not supported in a Visualforce Lightning Out context. Instead, use the methods offered by sforce.one directly from Visualforce.

You must log in to answer this question.

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