You need to sign in to do that
Don't have an account?

Regarding Execute Anonymous Window
Hello,
If I write the follwing SOQL querry in QUERRY EDITOR I am getting exact results(ID of Contact, Name of Contact and Name of Parent Account)
Note: We already know that Account is Parent of Contact
SELECT Id, Name, Account.name FROM Contact
If I execute same querry in Execute Anonymous window instead of Name of Parent Account I am getting Parent Account Id.
Why I am getting like that will any one of you explain me and what should I do to get Name of Parent Account.
Thank you in advance.
If I write the follwing SOQL querry in QUERRY EDITOR I am getting exact results(ID of Contact, Name of Contact and Name of Parent Account)
Note: We already know that Account is Parent of Contact
SELECT Id, Name, Account.name FROM Contact
If I execute same querry in Execute Anonymous window instead of Name of Parent Account I am getting Parent Account Id.
Why I am getting like that will any one of you explain me and what should I do to get Name of Parent Account.
Thank you in advance.
List<contact> cnt = [SELECT Id, Name, Account.name FROM Contact];
for(contact c:cnt)
System.debug(c);
Its giving Account Id instead of Name of Parent Account.
So, while u debugging the contact list will store account Id in the backend as i told, but you can get the parent fields which ever u queried while using.