You need to sign in to do that
Don't have an account?
Ramana123
I want to pass the Record Ids from VisualForce page to lightening Component , Can Anyone help me in this.
How to pass RecordIds to listofAccounts in Component From Vf Page
VF PAGE :
<apex:page standardController="Account" extensions="ListViewButtonController" recordSetVar="accs" >
</apex:page>
Controller :
global class ListViewButtonController {
List<SObject> selectedSobjects;
Set<Id> recordIds;
public String accIds;
global String evRespone { get; set; }
global ListViewButtonController(ApexPages.StandardController controller) {}
global ListViewButtonController(ApexPages.StandardSetController controller) {
evRespone = '';
selectedSobjects = controller.getSelected();
recordIds = new Set<Id>();
for(SObject singleRec : selectedSobjects) {
recordIds.add(singleRec.Id);
}
System.debug(recordIds) ;
}
}
Component :
<aura:component implements="lightning:isUrlAddressable">
<aura:attribute name="listofAccounts" type="set" />
</aura:component>
VF PAGE :
<apex:page standardController="Account" extensions="ListViewButtonController" recordSetVar="accs" >
</apex:page>
Controller :
global class ListViewButtonController {
List<SObject> selectedSobjects;
Set<Id> recordIds;
public String accIds;
global String evRespone { get; set; }
global ListViewButtonController(ApexPages.StandardController controller) {}
global ListViewButtonController(ApexPages.StandardSetController controller) {
evRespone = '';
selectedSobjects = controller.getSelected();
recordIds = new Set<Id>();
for(SObject singleRec : selectedSobjects) {
recordIds.add(singleRec.Id);
}
System.debug(recordIds) ;
}
}
Component :
<aura:component implements="lightning:isUrlAddressable">
<aura:attribute name="listofAccounts" type="set" />
</aura:component>
Ramana,
You can take references from my code.
Vf page
App Name: SeatimeSchedulerBookingAPP
component Name: SeatimeSchedulerBooking
Component:
from vf page record id come to this AccIDFromVfPage and then you can use it
Aura controller:
please let me know it is working or not??
Please mark it as the Best Answer so that other people would take reference from it.
Thank You
All Answers
Ramana,
You can take references from my code.
Vf page
App Name: SeatimeSchedulerBookingAPP
component Name: SeatimeSchedulerBooking
Component:
from vf page record id come to this AccIDFromVfPage and then you can use it
Aura controller:
please let me know it is working or not??
Please mark it as the Best Answer so that other people would take reference from it.
Thank You
In your code all is correct, but there is a problem in the code of "RecordId"
You are using !$CurrentPage.parameters.recordId but it is not working , so instead of "!$CurrentPage.parameters.recordId" it is $CurrentPage.parameters.Id. want to be