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
ChermaduraiChermadurai 

Get Currently selected View Records in LEad..Using visualforce

Dear All,

 

I need to get the currently selected  view (Ex: Now picklist selected "All Open Leads")records in Leads. Using SOQL..

 

THanks in Advance..

kiranmutturukiranmutturu
confused... you want the same standard list view in visualforce or u want records displayed based on custom criteria selection.
ChermaduraiChermadurai

Yes Kiran, I want the same standard list view in Visualforce..

kiranmutturukiranmutturu
you can use apex:enhancedlist or apex:listviews

<apex:page>

<apex:enhancedList type="Lead" height="300" rowsPerPage="25"
id="LeadList" />
</apex:page>
ChermaduraiChermadurai

Kiran,

 

I Created Enhanced List, from this if i selected "All open leads" in picklist, i am getting few record. Now i need to get that record into my controller..from these record i am going to do some other operaton..

ChermaduraiChermadurai

Kiran,

 

I have created enhancedList for Leads,now my requirement is, if i select "All open leads " in picklist few records are diplaying. Now i need to get that records to my controller..from this i am going to do some other operation.. how i need to do?

 

Pls give ur idea..

kiranmutturukiranmutturu
oopss.... no chance that is a standard widget from salesforce.... in this case you need to populate the records based on the selection of the view by using the custom code with checkboxes and then send the selected values to controller for further process....
ChermaduraiChermadurai

Yes kiran, i have created custom code checkboxes too..Let me know the soql..to retrieve the records..

kiranmutturukiranmutturu

soql query is changed based on the selctection for wxample if you selected all the All Leads then it is

 

[select id from Lead];

 

if you selected All Active leads then

 

[select id from Lead where status = "Active']....like that....so basically send the slected text from the view and prepare the query accorinding to view criteria...

ChermaduraiChermadurai

Thank u Kiran...hmm..now i got..