You are a blessing sir! I've utilized your videos since my admin journey started early this year. I'm curious... is it possible to go a level deeper with this? On an account show opportunities, and on each opportunity show each opportunity product? I tried just nesting the SOQL statements but I don't believe that might work with Apex.
Hello Frederick, depending on what you need to display, you could query each of the records you need into separate lists. You could start with the Account and then you'd query the opportunities related to that account or you could just start by querying opportunities where the account is whatever you're looking for and then lastly the opportunity product related to that opportunity. You can get parent/grandparent fields when doing the query for opportunity product records if you don't actually need to display the account or opportunity separately. I usually try to avoid nested queries when possible due to some of the limitations. Here are some links to documentation: developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_query_using.htm developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops_for_SOQL.htm
@@ChrisMarquez oh my god thank you! As a new admin learning this apex stuff would be near impossible without your content and assistance. Very much appreciate it!
you're a blessing, thank you and huge support!
Happy to help!
Hey, can you do a video o visualforce components?
Sure, I'll add it to the todo list.
You are a blessing sir! I've utilized your videos since my admin journey started early this year. I'm curious... is it possible to go a level deeper with this? On an account show opportunities, and on each opportunity show each opportunity product? I tried just nesting the SOQL statements but I don't believe that might work with Apex.
Hello Frederick, depending on what you need to display, you could query each of the records you need into separate lists. You could start with the Account and then you'd query the opportunities related to that account or you could just start by querying opportunities where the account is whatever you're looking for and then lastly the opportunity product related to that opportunity. You can get parent/grandparent fields when doing the query for opportunity product records if you don't actually need to display the account or opportunity separately. I usually try to avoid nested queries when possible due to some of the limitations.
Here are some links to documentation:
developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_query_using.htm
developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops_for_SOQL.htm
@@ChrisMarquez oh my god thank you! As a new admin learning this apex stuff would be near impossible without your content and assistance. Very much appreciate it!
No problem! Let me know if there are any topics you would like me to make videos on.