You need to sign in to do that
Don't have an account?
Database.getQueryLocator([SELECT obj.getDescribe().getName() from sObject]));
Hi Everyone,
my need is when i write a componet and i call that componet in my visualforce page it shows objectname(Account) and fieldname(phone) with in the pageblocktable and i use this componet in another object(contact) it will also display like this only...
how i pass the values dynamically in components??
I am are getting Error in Controller like
unexpected token: ')' at line 11 column 33
public class testcon {
public String acon{get; set;}
// ApexPages.StandardSetController must be instantiated
// for standard list controllers
public testcon(){
list<Schema.SObjectType> obj = Schema.getGlobalDescribe().Values();
ApexPages.StandardSetController setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
[SELECT obj.getDescribe().getName() from sObject]));
}
public ApexPages.StandardSetController setCon {
get{
return setCon;
}
set;
}
// Initialize setCon and return a list of records
public List<sObject> getacc() {
return (List<sObject>) setCon.getRecords();
}
}
Thanks&Regards
neeru
You can't query SObject. You'll have to construct a query string from Schema.getGlobalDescribe() and/or Schema.SObjectType.getDescribe() functions.
thanx for replay me Sfdcfox i am not getting totally...can you explain with some sample query please or othewise please modify the above query
thanks&Regards
neeru