You need to sign in to do that
Don't have an account?
SFDC16
how to get all contact names of particular one Account in apex soql
I want fetch all contact names of perticular account in apex class
List<Contact > lis=[SELECT Id, Name FROM Contact where Account.Id = '0017F00000hvpw4'];
System.debug('lis'+lis);
List<Contact > lis=[SELECT Id, Name FROM Contact where Account.Id = '0017F00000hvpw4'];
System.debug('lis'+lis);
Then you should go with a wrapper class.
try the below,
and the controller,
Let me know if you get any errors.
All Answers
Update your query to:
Mark solved if it does help you.
Is this what you require.
Then you should go with a wrapper class.
try the below,
and the controller,
Let me know if you get any errors.