App Name: SeatimeSchedulerBookingAPP component Name: SeatimeSchedulerBooking Component:     from vf page record id come to this AccIDFromVfPage and then you can use it  Aura controller: component.get('v.recordId') 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  ", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T4IogSAF", "datePublished": "2021-05-17T19:25:28.000Z", "author": { "@type": "Person", "name": "Suraj Tripathi", "url": "https://trailblazers.salesforce.com/profileView?u=0053A00000DARW3QAP", "affiliation": { "@type": "Organization", "name": "Cloud Analogy" } } }, "suggestedAnswer": [ { "@type": "Answer", "text": "Hi Suraj, 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  ", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T4IogSAF", "datePublished": "2022-10-06T11:51:20.000Z", "author": { "@type": "Person", "name": "Rahul Joshi", "url": "https://trailblazers.salesforce.com/profileView?u=0053A00000DXujSQAT", "affiliation": { "@type": "Organization", "name": "iBirds Software Services Pvt. Ltd." } } } ] } } Skip to main content
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>

 
2 respuestas
  1. 17 may 2021, 19:25

    Ramana,

    You can take references from my code.

    Vf page

    <apex:page showHeader="false" sidebar="false" >

    <apex:includeLightning />

    <div id="lightning" />

    <script>

    $Lightning.use("c:SeatimeSchedulerBookingAPP", function() {

    $Lightning.createComponent("c:SeatimeSchedulerBooking",

    {

    "recordId" :"{!$CurrentPage.parameters.recordId}"

    },

    "lightning",

    function(cmp) {

    console.log('Component Loaded');

    });

    });

    </script>

    </apex:page>

    App Name: SeatimeSchedulerBookingAPP

    component Name: SeatimeSchedulerBooking

    Component:

        <aura:attribute name="recordId" type="string"/>

    from vf page record id come to this AccIDFromVfPage and then you can use it 

    Aura controller:

    component.get('v.recordId')

    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

     
0/9000