Hot answers tagged

3 votes

Batch Apex Class Invoked From Before Delete Trigger is not deleting Files Attached to accounts

The query won't return any records, because the accounts will have already been deleted by the time your batch class has run. Instead, query for those files in the trigger, and use a batchable, if you'...
sfdcfox's user avatar
  • 481k
2 votes

Batch Apex Class Invoked From Before Delete Trigger is not deleting Files Attached to accounts

If the execute of your batch class is not running, but the finish is, it means that the query in the start is returning zero results. Your batch class will be running asynchronously, so it will be ...
fred's user avatar
  • 2,783
1 vote

Dynamic SOQL Error: Unexpected Token ':' - I have searched for two days, what could I be missing?

You can use String join to fix the issue. String selectList = String.join(fields,','); String soqlQuery = 'SELECT ' + selectList + ' the rest of the query... ';
Ken's user avatar
  • 196

Only top scored, non community-wiki answers of a minimum length are eligible