You need to sign in to do that
Don't have an account?
Vidhyasagaran Muralidharan
Requirement on VF and apex
I have a requirement like there are five objects in my app. and each object has set of records.And there is VF page in that i have one picklist .
which contains all these five object names.If i select a object name it should dynamically populate records and column name for the particular object in to that visulaforce page.
Guys help me in this.
which contains all these five object names.If i select a object name it should dynamically populate records and column name for the particular object in to that visulaforce page.
Guys help me in this.
I am giving you the idea of how to implement this requiremet not code so try my concept and see it happen or not:
1. create one controller
2. create one picklist using apex and assign the 5 states value in it
3. Declare 5 variable for 5 objects of list type for storing the result
4.now in coding section write an if condition and checkout the state name like this
if(state=='Tamilnadu')
{
your variable name(list<object of which you want to store the result>tl = [select name,city,id,................. from desires object name)
}
else if(state=='AP)
{
list<object of which you want to store the result> obj2 = [query]
}
try in this way you will get result.
Thanks
Rishav