You need to sign in to do that
Don't have an account?
MySet
Record retrieval Issue:
Hi -
I'm trying to retrieve Account phone number, Account Number from Contact. But I'm not able to.. Plzz help.
List<Contact> conts = [SELECT ID, NAME, Account.Phone, Account.AccountNumber FROM CONTACT WHERE AccountId != NULL LIMIT 2];
System.debug('$$$$$ CONTACTS ARE @@@@@@@' + conts[0]);
pls try this.
List<Contact> conts = [SELECT ID, NAME, Account.Phone, Account.AccountNumber FROM CONTACT WHERE AccountId != NULL LIMIT 2];
System.debug('$$$$$ CONTACTS ARE @@@@@@@' + conts[0].Account.Phone + ' ####' + conts[0].Account.AccountNumber);
If this post solves your problme please mark it as solution.
Thanks,
Samba
All Answers
pls try this.
List<Contact> conts = [SELECT ID, NAME, Account.Phone, Account.AccountNumber FROM CONTACT WHERE AccountId != NULL LIMIT 2];
System.debug('$$$$$ CONTACTS ARE @@@@@@@' + conts[0].Account.Phone + ' ####' + conts[0].Account.AccountNumber);
If this post solves your problme please mark it as solution.
Thanks,
Samba
Thank you Samba.
-MySet