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
sai ramsai ram 

I have one field with self relation ship account how to get that id when i run the query in query editor iam getting value but in trigger same query throwing null

How to selfrelation ship of account field id in trigger
ShirishaShirisha (Salesforce Developers) 
Hi Sai,

Greetings!
 
If you have created the lookup field with the field Name as Account1 (which is self relationship with Account iteself) then you can use the below sample SOQL query to get the records.
 
SELECT Id, Account1__c FROM Account

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri