function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Asma ErumAsma Erum 

SOQL LookUp disply Name of Account

I have the following SOQL query: 

Select Id, IsDeleted, MasterRecordId, Name, LastName, FirstName, Salutation, Type, RecordTypeId, ParentId, 

FROM Account 
LIMIT 10

 

The parentId references the Account Entity as well as we have 3 types of Account. I need to get the Name of the Parent Account. I'm not sure how to retreive this value. 

Best Answer chosen by Asma Erum
Amit Chaudhary 8Amit Chaudhary 8
please update your query like below
 
Select Id, IsDeleted, MasterRecordId, Name, LastName, FirstName, Salutation, Type, RecordTypeId, ParentId, parent.name FROM Account LIMIT 10

let us know if this will help you

All Answers

Amit Chaudhary 8Amit Chaudhary 8
please update your query like below
 
Select Id, IsDeleted, MasterRecordId, Name, LastName, FirstName, Salutation, Type, RecordTypeId, ParentId, parent.name FROM Account LIMIT 10

let us know if this will help you
This was selected as the best answer
Asma ErumAsma Erum
Thanks. This worked. Is there any documentation for this?