You need to sign in to do that
Don't have an account?
Muhammad Amer
Querying a related object using SOQL
Hi there
I have a custom field on my Account object, say 'refered_by__c'. This field contains the ID of another Account object.
I want to write a SOQL something like this (psedu query):
select id, name, refered_by__c, <name of "refered_by__c"> from account
Please advise how can I write this query using SOQL.
Thank you!
I have a custom field on my Account object, say 'refered_by__c'. This field contains the ID of another Account object.
I want to write a SOQL something like this (psedu query):
select id, name, refered_by__c, <name of "refered_by__c"> from account
Please advise how can I write this query using SOQL.
Thank you!
use below query
you need to use relationship query here to get output
Mark as best answer if it helps you.
Thanks,
Ghanshyam Choudhari
All Answers
use below query
you need to use relationship query here to get output
Mark as best answer if it helps you.
Thanks,
Ghanshyam Choudhari
While I was waiting for response, I also managed to find this out. Thanks again!
please mark above answer as Best Answer so other people can also benefit. Thank you