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

Help reading/understaning batch apex class
Hey everyone!
I'm trying to wrap my head around this apex class.
We've been trying to figure out what exactly is causing some tasks to auto-complete. I believe its this class, but not entirely sure as I havent worked with the database.batchable method.
Could someone help me understand what this class does?
global class TaskRelatedToAssignerBatch implements Database.Batchable<sObject> { global Database.Querylocator start (Database.BatchableContext BC) { Date today = System.today(); Date yesterday = today.addDays(-1); return Database.getQueryLocator('SELECT Id, WhoId, WhatId, CreatedDate FROM Task WHERE ((Status = \'Completed\' AND Subject LIKE \'Email:%\') OR RecordTypeId = \'0125A000000tbd5\') AND (WhatId = null OR WhatId_String__c LIKE \'001%\') AND WhoId != null AND CreatedDate >= :yesterday'); } global void execute (Database.BatchableContext BC, List<sobject> scope) { TaskUtils.relateTasksToOpportunityOrAccount(scope); } global void finish(Database.BatchableContext BC) {} }
Thank you!
Do you know what the following method does? Without it, I'm unsure what actions are being taken on the list of Tasks.