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'...
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 ...
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... ';
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
batch × 2007apex × 1391
schedulebatch × 250
scheduled-apex × 229
unit-test × 196
soql × 143
trigger × 130
governorlimits × 105
callout × 92
asynchronous × 61
code-coverage × 53
future × 53
visualforce × 45
class × 45
query × 36
email × 33
dml × 33
rest-api × 32
stateful × 30
error × 28
exception × 28
asyncapexjob × 27
limits × 25
scheduled-job × 25
singleemailmessage × 24