You need to sign in to do that
Don't have an account?
José Rivero
help to write an SOQL query
Hello,
I want to show my Scheduled Revenue by account, I have 3 objects with these variables :
- Account : account_name , account_id
- Opportunity : account_id , stage , opportunity_id
- ORSchedule_c : opportunity_id , expected_revenue , date
my goal is to return : account_name , stage , exêcted_revenue , date
Can someone help me with these ?
Thank you !
José
I want to show my Scheduled Revenue by account, I have 3 objects with these variables :
- Account : account_name , account_id
- Opportunity : account_id , stage , opportunity_id
- ORSchedule_c : opportunity_id , expected_revenue , date
my goal is to return : account_name , stage , exêcted_revenue , date
Can someone help me with these ?
Thank you !
José
You can always get the parent, the parent of the parent, etc ... from an object ( five levels can be specified in a child-to-parent relationship ).
It is not "account__r" because it is a standard object and there is not "__r" here. It is just opportunity__r.account.
Please go through the below link:
https://developer.salesforce.com/forums/?id=906F0000000kIFGIA2
And go to the bottom of the page to see the SOQL query.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Sachin Arora
www.sachinsf.com