You need to sign in to do that
Don't have an account?
Neha@Sfdc
can generic SObject hold data of 2 different objects?
Hi All,
But i am unable to access contentData on my vf
Any help would be appreciated
Thanks,
Neha
- i have a scenario where i want to access List<List<SObject>> lst=[FIND :inputText RETURNING Account(name),Product2(name)]
- lst contains list of two different types and i want to anyhow show this list values on a visual force page
- I assume that it is possible to do so by the following
for(List<sObject> obj:showContent) { for(sObject accSobj:obj) { contentData.add(accSobj); } }
But i am unable to access contentData on my vf
Any help would be appreciated
Thanks,
Neha
Thanks for the reply...Now i have changed my code as under
and my VF as under:
Although now my code is working as expected,but i feel something is incorrect...i have hardcoded the field's list...as i had to display a field that would be in both the objects...
-
Problem:Is there any way to get the fields apart from using the abv method i have mentioned?
Thanks,Neha