You need to sign in to do that
Don't have an account?
ShaikA
Compile Error: Initial term of field expression must be a concrete SObject: List<Test__c>
Hi,
Please help me to solve below error:
Error: Compile Error: Initial term of field expression must be a concrete SObject: List<Test__c>
Class:
public PageReference login() {
list<Test__c> userList=[select id from Test__c where name=:Name AND Password__c=:password];
system.debug('userList>>>' +userList);
PageReference Page = new PageReference('/' +userList.id);
Page.setRedirect(true);
return Page;
}
Regards,
Anand
Please help me to solve below error:
Error: Compile Error: Initial term of field expression must be a concrete SObject: List<Test__c>
Class:
public PageReference login() {
list<Test__c> userList=[select id from Test__c where name=:Name AND Password__c=:password];
system.debug('userList>>>' +userList);
PageReference Page = new PageReference('/' +userList.id);
Page.setRedirect(true);
return Page;
}
Regards,
Anand
The query will return list but you are using "list.Id ". Following is the update code
Hope it helps you.
Thanks,
Anjith