0

I have an After create Case flow that performs two actions when certain conditions are met:

  1. It creates a Case Comment on another Case
  2. It deletes the triggering record

In itself it works perfectly: the Case Comment is created, the Case is deleted.

An admin user sees the usual 'Case "xyz" was created.' toast, though without the "xyz" part. But a non admin user does not see this toast. Instead an error is shown:

The requested resource does not exist

The debug log does not contain any errors. The Case has been deleted. It is located in the Org Recycle Bin.

Maybe that is the problem: admins have access to the Org Recycle Bin, but ordinary users do not.

So what could be the cause and how can it be solved? The process in itself works, but non admin users are led to believe that something has gone wrong.

2
  • 1
    I would delete the Case (triggering record) asynchronously
    – cropredy
    Commented Nov 19 at 1:54
  • @cropredy Thank you, good suggestion. It solved my problem. Commented Nov 19 at 8:16

1 Answer 1

1

cropredy had a good suggestion.

Instead of deleting the record in the flow, I created a new Case checkbox field 'Delete this case' (default value False). The original flow assigns True to the field.

Next, I created an asynchronous flow that deletes a Case, whenever 'Delete this case' is true.

Asynchronous Case flows run after other Case flows, so this works perfectly.

You must log in to answer this question.

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