Something is not going right in my flow and it's not crashing, so I don't get an e-mail with a trace.

But if I want to debug my flow, the dialog asks me to select a CaseComment. Which is impossible, because I want to create a new one.

How do I do this?

  • 1
    So whatever existing record you select, will "act" as if it was inserted for your testing purposes. However, in my attempts to debug specifically a CaseComment Flow, it doesn't seem to work as I'm unable to actually select a CaseComment record (it seems to select the parent Case record instead). Works fine for other objects, however. Nov 4, 2021 at 13:54
  • @KrisGoncalves So, another odd behavior of CaseComment then... Encountered one yesterday as well, regarding custom notifications. You answered that one as well :-) Nov 4, 2021 at 14:01
  • I'll post an answer as I presume it'll just be a limitation specific to this object since, as you noted, there's certainly others due to it not really being like other objects - but, I'll try to see if I can confirm it's expected or if there's any workaround. Nov 4, 2021 at 14:44

2 Answers 2


CaseComment seems to be a weird exception to this functionality - as it doesn't appear to allow you to select a CaseComment record. It always ends up being the parent Case record. When you search case comment records to select, the only clickable item is the Case Number.

enter image description here

With no way to customize the layout that displays, it then clearly shows a Case record selected in the Triggering Record box.

enter image description here

This is either just a bug or an unfortunate limitation when it comes to CaseComment as it already has other limitations as an object as noted in the idea to Make Case Comment Object and Page Layouts Customizable

The expected behavior is that whatever record you select (even though it already exists) will act as if it's inserted so you can appropriately test whatever logic should happen after that record is inserted.

In Debug Record-Triggered Flows, they mention this

Under Triggering Record, you can choose a record for the debug run, which triggers the flow as if the record is created, updated, or deleted

As well as having text under Triggering Record that mentions the same behavior.

enter image description here

  • Strictly speaking, this isn't an answer to my question. But I flag it as such, as you put much effort into it. How I solved my immediate problem: I activated debug logging in Setup for the user that creates the CaseComment. The debug log turns out to be pretty detailed for flows and it actually told me what I needed to know to solve my problem. Nov 4, 2021 at 15:14
  • Definitely feel free to add that as a separate answer (and accept it). I was hyper-focused on the flow-provided debug tool so it's good you have a way to debug in the end specifically for CaseComment Nov 4, 2021 at 15:27

I'm having the same issue, unfortunately I don't have a solution for it. I logged a new Idea here: https://ideas.salesforce.com/s/idea/a0B8W00000N6HH3UAN/ability-to-set-a-casecomment-record-as-the-triggering-record-when-debugging-flow

Please upvote!

You must log in to answer this question.

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