You need to sign in to do that
Don't have an account?
Vempally
Given Accountid, SOQL not retrieving Contacts
Hi Folks,
Plz check with the following code of a class for custom button on Account..
I need to get the contacts when account id is passed through the custom button to a global class.
Plz check with the following code of a class for custom button on Account..
I need to get the contacts when account id is passed through the custom button to a global class.
Global class AccountContactFieldUpdate{ public static Id accountid; public static List<Account> lst_acc; webservice static void contactFieldsConcat(Id accid){ accountid = accid; string query ='select id, name, (select id, name from Contacts) from account where id =: accountid'; lst_acc = Database.query(query); system.debug(lst_acc); } }
Modify your query as
Thanks,
Mudasir
Hello Vempally,
if this solves your issue.
Please mark this as solved.
Don't forget to select best answer to make our efforts visible in the developer forum.
Please mark this as solution by selecting it as best answer if this solves your problem, So that if anyone has this issue this post can help.