The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

2

The main flag that can tell you a retry has happened, is that a new ID you stashed in a static variable is no longer valid. If your trigger code creates any new records you could check those IDs against the DB. I wish Salesforce gave us a better way to do this. One crafty way I thought of in another thread was to enqueue a disposable Queueable class, for no ...


1

1) To bulkify your trigger, you need to gather all used projects in one Map to have an immediate access to it inside the for-loop on child object. 2) To process isUpdate trigger, you need to reduce current project value by the amount of budject hours on task from Trigger.oldMap, so that new value will be added clearly. Here is the code: trigger ...


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