You need to sign in to do that
Don't have an account?

Downward SOQL with bulkification
v47
Running into a bulkification problem - given a number of Tasks from TaskHandler.afterBulk I'm trying to access the fields inside the subquery and use them in a WHERE clause.
TIA,
Chris
Running into a bulkification problem - given a number of Tasks from TaskHandler.afterBulk I'm trying to access the fields inside the subquery and use them in a WHERE clause.
for( Account a : [SELECT Id, Name, (SELECT Id, Email_Direction__c FROM Tasks ) FROM Account WHERE foo.id IN :Trigger.new] ) { doSomething( a.Id, foo.Email_Direction__c); }What would the right syntax be to achieve this?
TIA,
Chris
All Answers
In order to use the field of child records, you need another for loop as mentioned below:
Please let me know if you any other help on this.
Thanks,
Abhishek Bansal.
TIA,
Chris
Our org uses Slack instead of Skype. Can you Slack?
Please find the code below:
Please take care of the syntax errors and let me know if you need any further help on this.
Thanks,
Abhishek Bansal.