You need to sign in to do that
Don't have an account?
ifthikar Ahmed 1
what is the mistake
i am new to salesforce getting parssing error what is wrongwith my query
select id,name (select id, name from Contacts) from Account where Name ='test6'
select id,name (select id, name from Contacts) from Account where Name ='test6'
Greetings to you!
You have to use a comma to separate each field you want to access. And this soql query must be in the square bracket. And for the best practice, you should use the list for assigning the result of the soql.
List<Account> ac = [select id,name, (select id, name from Contacts) from Account where Name ='test6'];
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com
All Answers
You should use a comma after name in first query, Please try this code Thank You
www.nubeselite.com
Developement | Training | Consulting
Please Mark this assolution if your problem resolved.
Greetings to you!
You have to use a comma to separate each field you want to access. And this soql query must be in the square bracket. And for the best practice, you should use the list for assigning the result of the soql.
List<Account> ac = [select id,name, (select id, name from Contacts) from Account where Name ='test6'];
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com