You need to sign in to do that
Don't have an account?
Showing multiple objects in a list
Please clear following doubts :
(1) How do i make the values of a picklist as the list of all objects available in my org
(2) How do i enable searching in these objects?
For eg:- if i select accounts then i should be able to search for accounts specifying condition (or How do i retrieve details on objects using an SOQL on the selected object in picklist)
(3) How do i Make the search available on multiple objects
for eg:- If i select multiple values : like Account,Contacts and Leads
Then search result list should show all accounts,contacts and leads that meet search condition (Like a search of account,lead,contact that have name starting with "a")
Please guide me through the procedure
Here I have writen one blog which is almost similar to your requirment .Here you will getall objectin a pick list.
http://manojjena20.blogspot.in/2015/10/selecting-any-object-and-display-all.html (http://manojjena20.blogspot.in/2015/10/selecting-any-object-and-display-all.html)
Thank you manoj...
2 more doubts remain :
Once the object is selected how do i execute an soql query over it?
Also how do i enable search on multiple objects
Check below code it will help you to search selected object record .
For your second option you need to use SOSL for that you need enter a key word in text field and use sosl to finf matching reords
Check below link for SOSL it wil help !!
http://www.sfdcpoint.com/salesforce/sosl-example-in-salesforce/http://www.sfdcpoint.com/salesforce/sosl-example-in-salesforce
Let me know if it helps !!
Thanks
Manoj
Doesnt seem to work for my use case.
Problem i face is :
I need a controller,
But what type of controller i need depends on the value selected from a picklist that shows all available objects in my org.
SO basically i want to know how to write a generic controller that handles search on multiple objects