답변 1개
HI Piyush,If you are looking for an apex method that accepts account name and Returns the list of contacts for that account, try public class PassAccount {
public static List<Contact> getcontact(String Name){
List<Contact> conlist=[select id, Name , Accountid from Contact where account.name=:name];
return conlist;
}
}
Call this method in anonymous block as
If this information helps, please mark the answer as best. Thank youList<Contact> con=PassAccount.getcontact(‘huuu’);
system.debug(‘asa’+con);