function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Diganta Mallik 7Diganta Mallik 7 

I have added a VF page to a lightning app builder. I want to know how to pass a record id to the VF as URL PARAMETER. Please let me know asap.

I have added a VF page to a lightning app builder. I want to know how to pass a record id to the VF as URL PARAMETER. Please let me know asap.
_Zach Boyd_Zach Boyd
There should be an "id" parameter is available. I ran a test with a Visualforce component that referenced a custom Apex controller and was able to access the id. Sample code is below

EmbedVisualforcePage.vfp
<apex:page controller="EmbedVisualforcePageController">
    <apex:outputText value="{!recordId}" />
</apex:page>

EmbedVisualforcePageController.apxc
public class EmbedVisualforcePageController {

    public Id recordId { get; set; }
    
    public EmbedVisualforcePageController() {
	
		// get record id from query parameters        
    	recordId = ApexPages.currentPage().getParameters().get('id');
        
    }    
    
}
_Zach Boyd_Zach Boyd
I would like to add a note to the above. I had attempted to just use the standard controller on a custom object in my visualforce page, but was not able to select it from the drop down when adding to the lightning record page. The component would say "No visualforce pages available". I believe it might still be a bug related to this https://success.salesforce.com/issues_view?id=a1p3A000000IYo9QAG.
Diganta Mallik 7Diganta Mallik 7
While adding the VF page to the Lightning App Builder, there is no way to provide the record id as URL parameter. Please suggest.
_Zach Boyd_Zach Boyd
It is automatically passed to you. Just select the visualforce page you want rendered and you will have access to the id.
_Zach Boyd_Zach Boyd
I went ahead and wrote a blog post about this scenario to show others as well as discuss a potential bug in Salesforce. This should walk you through the exact steps. Please mark as correct if you find this helpful. Thanks.

https://sfdctrailblazer.com/2016/10/17/how-to-embed-a-visualforce-page-in-lightning-app-builder/
Diganta Mallik 7Diganta Mallik 7
I have a VF page.To run the VF page, I need to prepare the URL like the following : https://diganta-mallik-dev-ed--digantans.ap1.visual.force.com/apex/AccountPDF ?*id=0019000000lUAGQ* The name of this VF page is* AccountPDF.* *I need to know how to place this VF page along with the URL parameter in Lightning App Builder so that it can display the record detail page of a Particular Account.* *Please let me know whether I have explained my Problem Statement clearly.* *Please reply the solution for this, I am waiting for a week almost.*
Douglas C. AyersDouglas C. Ayers
Diganta,

Zach has provided you the answer and step by step instructions on his blog post. If you need your visualforce page to run for a specific record id regardless the Lightning Page it belongs to then just hard code the id in your controller.

This is a free, volunteer, community driven forum. Your comment "I am waiting for a week" is rude and exudes self-entitlement. You have yet to show your efforts at following the instructions provided to you; no screenshots of what you've already tried.