You need to sign in to do that
Don't have an account?
Steve Ross 39
passing paramters to visualforce page
Having an issue passing the record Id to a visualforce page with a controller exitension.
My URL is https://plumlending--lightning.lightning.force.com/lightning/n/Entity_View?=001m000000igKW8AAM
Controller:
public class entityViewControllerExtension {
public Id recordId {get; set;}
public Account acct {get;set;}
// The extension constructor initializes the private member
// variable acct by using the getRecord method from the standard
// controller.
public entityViewControllerExtension(ApexPages.StandardController stdController) {
this.acct = (Account)stdController.getRecord();
this.recordId = stdController.getId();
system.debug('entityViewControllerExtension: acct.Id='+acct.Id);
system.debug('entityViewControllerExtension: recordId='+recordId);
}
}
VF page:
<apex:page standardController="Account" extensions="entityViewControllerExtension" tabStyle="account">
<apex:form >
<apex:pageBlock>
<apex:pageBlockSection columns="2">
<apex:pageBlockSectionItem helpText="...">
<apex:outputLabel value="Entity View"/>
<apex:outputText> fields will go here </apex:outputText>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem labelStyle="display:none;" dataStyle="display:none;">
<apex:outputText > </apex:outputText>
<apex:outputText > </apex:outputText>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I see null values from my debug statements and can't understand why. This must be an issue with the URL format as it works in classic but not lightning.
Any help is much appreciated!
My URL is https://plumlending--lightning.lightning.force.com/lightning/n/Entity_View?=001m000000igKW8AAM
Controller:
public class entityViewControllerExtension {
public Id recordId {get; set;}
public Account acct {get;set;}
// The extension constructor initializes the private member
// variable acct by using the getRecord method from the standard
// controller.
public entityViewControllerExtension(ApexPages.StandardController stdController) {
this.acct = (Account)stdController.getRecord();
this.recordId = stdController.getId();
system.debug('entityViewControllerExtension: acct.Id='+acct.Id);
system.debug('entityViewControllerExtension: recordId='+recordId);
}
}
VF page:
<apex:page standardController="Account" extensions="entityViewControllerExtension" tabStyle="account">
<apex:form >
<apex:pageBlock>
<apex:pageBlockSection columns="2">
<apex:pageBlockSectionItem helpText="...">
<apex:outputLabel value="Entity View"/>
<apex:outputText> fields will go here </apex:outputText>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem labelStyle="display:none;" dataStyle="display:none;">
<apex:outputText > </apex:outputText>
<apex:outputText > </apex:outputText>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I see null values from my debug statements and can't understand why. This must be an issue with the URL format as it works in classic but not lightning.
Any help is much appreciated!
You forget to pass Id=<Record Id>
Correct one is this
https://plumlending--lightning.lightning.force.com/lightning/n/Entity_View?Id=001m000000igKW8AAM
OR
https://plumlending--lightning.lightning.force.com/apex/Entity_View?Id=001m000000igKW8AAM