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
mary pamishettymary pamishetty 

GETRECORDIDS is not working in vf page

I've used below code in vf page but its not working.What is an alternative to GETRECORDIDS.
  var selected = {!GETRECORDIDS($ObjectType.Lead)}; (I have this code in custom button used this in vf page)
Amit Singh 1Amit Singh 1
You can use wrapper class concept.
Refer below link for more info.
http://www.sfdcpoint.com/salesforce/wrapper-class-in-apex/
Let me know if this helps :)
Thanks!
Amit Singh
M BestM Best
Take a look at this article: 
https://salesforce.stackexchange.com/questions/131935/how-to-pass-in-checked-objects-from-relatedlist-into-vf-and-apex-class-construct

By invoking the standard list controller via "recordSetVar", you expose all of the ids in the listview as well as just the selected ids.
Note the "rendered = false". We don't need to see all of the ids; we just want to make them available.

<apex:page standardController="Account" recordSetVar="rsVar">
<apex:repeat value="{!rsVar}" var="myrow" rendered="false">
{!myrow.Id}
</apex:repeat>
<script>
alert(rsVar);   //  all ids in the recordSet
alert("{!Selected}");  // just the selected ids
// Selected looks like this: [0015000000KhzKbAAJ, 0015000001S3N8rAAF, 0015000000Ki0YDAAZ]
...