You need to sign in to do that
Don't have an account?
reuel3
Issue with subquery
Here's my query that works in workbench when run with just soql. I lose the subquery data when I try to add the Contact to a list. ContactHolidayAssociations is a junction object between Holiday and Contact.
contacts = [SELECT firstName, lastName, Id, Account.Name, Account.Id, (SELECT Name, Holiday__r.Id, Holiday__r.Holiday_Name__c
FROM ContactHolidayAssociations__r)
FROM Contact]
So when I do a System.debug with the contacts list, no Holiday data shows. Holiday data does show when running the same query in workbench.
What am I missing?
Thanks!
Doublecheck this please, by trying the following code:
When you convert an sObject to a String, you don't get the child objects that are contained within; but they're still there even though they don't show. This code should reveal them. Let me know if this works.
If this helps, please mark it as a solution, and give kudos (click on the star) if you think I deserve them. Thanks!
-Glyn Anderson
Certified Salesforce Developer | Certified Salesforce Administrator