Is there a way I could see what is the Flow, or Apex trigger that seems to be looping a bunch of times in my salesforce instance?

Because of this issue, I haven't been able to do batch updates, because I always get the CPU Time limit exceeded.

I have work with debug logs a little bit, and not sure if that is the right way to go, but I find it kind of hard to read those.

Thank you!

  • Do you have any process builders that are performing field updates that are related to what you process in the batch? Also have you tried setting the scope chunk size to a small value instead of using default 200 for the batch?
    – Phil W
    Sep 9, 2020 at 22:51
  • I ask about process builders doing record updates because these cause a separate flow through DML processing each time...
    – Phil W
    Sep 9, 2020 at 22:52
  • Yes, but we do have a ton of those. Based on what you are saying, the issue is related mostly to us having a bunch of process that are doing field updates?
    – Neto0291
    Sep 10, 2020 at 5:00
  • 1
    If you have lots of these this is probably causing your trigger to re-invoke loads of times and is probably a significant contributor to your problem. You should be able to use the developer console's performance profiling view to help visualize what is happening.
    – Phil W
    Sep 10, 2020 at 6:16

1 Answer 1


Open the Developer Console (Gear Icon > Developer Console in Salesforce), click on Debug > Change Log Levels... > Add/Change, then click Add, name it Profiling, set all fields/columns to NONE except for Profiling, which should be set to FINEST. Once selected, click Done, and Done again. Finally, click in Debug > Show My Current Logs Only to uncheck this feature. After this, you can run your transaction. You'll see a new log appear in the Logs tab in the Developer Console. Double-click to open it, and you'll see lines telling you which parts of execution took the most time. This should help you narrow down your problem.

  • Hi! Tried this and got 3 logs. "RollUp Batch Agent ec3..." QueuableHandler" "Dynamic_ASYNC" Any idea which one I should check?
    – Neto0291
    Sep 9, 2020 at 22:37
  • @Neto0291 It's not clear from the names. Do you see the Status column? Do any have a message other than "Success"? You'll want to try a bulk update to force the error, it should be obvious which is which when you get the error.
    – sfdcfox
    Sep 9, 2020 at 23:51
  • Dataloader is showing several hundred errors, but at the console level on my logs I can only see the ones for success. No error logs are being showed.
    – Neto0291
    Sep 10, 2020 at 0:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .