You need to sign in to do that
Don't have an account?

Initial term of field expression must be a concrete SObject: LIST
Hi
LIST <contact> c=[select lastname,firstname,account.name,account.industry from contact where title='New Software'];
system.debug(c.account.name);
system.debug(c.account.industry);
system.debug('the lastname is '+c.lastname);
Initial term of field expression must be a concrete SObject: LIST?Means
Thanks Ramesh
Hi,
You have to use For loop here for list.
Try to use following code.
Important :
Hit Kudos if this provides you with useful information and if this is what you where looking for then please mark it as a solution for other benefits.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/
so you will have to loop through the list and get individual contact records.
for(Contact con : c){
System.debug(con.account.name);
------
----------
}
Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.
system.debug(c.account.name);
C is a list type so ,if put c.account.name system cannot recognize which one to display.
So it is raising this error .just change the system .debug to this:-
system.debug(c[0].account.name);
system.debug(c[0].account.industry);
system.debug('the lastname is '+c[0].lastname);
This display the first element of the list.
Thanks Anil
List<job_Application__c> j=[select id,name,Candidate__r.name,
candidate__r.phone__c,
Position__r.Functional_Area__c
from job_application__c
where name='JA-0011'];
system.debug(j[0]);
In the above code it's not display all fileds, it's display only id,name,candidate__r.name,the remaing fileds not display but it shows individual system log like system.debug
(j[0].candidate__r.phone);
Thanks
Are you using developer console. You can double click on the system.debug line which opens up a pop up to display more information.
Regards,
Satish Kumar
LIST <contact> c=[select lastname,firstname,account.name,account.industry from contact where title='New Software'];
system.debug(c[0].account.name);
system.debug(c[0].account.industry);
system.debug('the lastname is '+c[0].lastname);
Once you add the Index, it should be fine. Hopefully there are some records returned from the SOQL, else you will get Null pointer exception.
Please mark the response if you think this addresses the issue. Others will get benefited from this.