1

Our Salesforce system has a private OWD for the Case object, with access opened up via Owner-Based Sharing Rules, Case Teams & the Role Hierarchy. We recently implemented assignment rules to start assigning Cases to queues. Users are now sometimes getting this error when they try to create a new Case:

enter image description here

After some investigation, it seems like the Case Assignment rules are causing this (turning them off makes the error go away). I can only assume the cause is that the assignment rules are making the creator lose access to the record.

Here's the weird part... The Case is still created in the background even if they receive this error! This has led to lots of Case duplication by Users because they keep retrying and getting the error. This seems very odd to me.

Has anyone experienced this before? Can anyone explain this behaviour?

My best guess at what's happening: Users are allowed to create the record, and then the assignment rules cause the User to lose access to it, which then prevents Salesforce from taking the User to view the record. Still, I would expect to be taken to the record, and just blocked from seeing it. I wouldn’t have expected an error to appear on the create screen, which makes it seem like the record was not created. Doesn't seem like expected behaviour??

7
  • Is the error only for particular user? Mar 16 at 6:41
  • @SaiPraveenKakkirala No, it's for all users, but only when they try create a Case which is going to be assigned to a different unit/team (i.e. they won't have access to the case after the assignment rules run)
    – JustinF
    Mar 16 at 9:32
  • 1
    Did you compare the debug logs using assignment rules and with out assignment rules active? Mar 16 at 10:00
  • @SaiPraveenKakkirala yea I can do that, but before I try dig any deeper I would like someone to validate whether the scenario described is EXPECTED behaviour. Because if so, then there's nothing further to troubleshoot.
    – JustinF
    Mar 24 at 7:30
  • I don't think this is something expected behavior. Mar 24 at 7:40

2 Answers 2

1

Okay, thanks to @Rohit in the comments it seems like this is expected/known behaviour and just really bad error handling design by Salesforce.

My temporary fix has been to create a screen flow which runs from a custom list view button and ensures that the User is told very clearly that the Case WAS submitted but they may no longer have access to it.

I have posted an idea on the IdeaExchange to fix this. Please upvote it!

2
  • Great! You can use a flow to insert Apex sharing as well to grant access for the case.
    – Rohit
    Mar 29 at 1:50
  • 1
    @Rohit absolutely! Just need to confirm with Stakeholders if the original Case submitter SHOULD get access to the Case after submitting :)
    – JustinF
    Mar 29 at 7:13
1

I think it's because case is assigned into Queue suddenly once after created. Actually the creation record page trying to show the created case record into that user but created user of the case record is lost his access(due to case assigned into Queue via Case assignment rule). So it's cause error due to case's OWD settings is configured as Private and after that case record is assigned into Queue the Queue member(s) is only able to access that created case not that created user.

Now, please create a custom logic in flow as follows to maintain previous case created user's access to fix this issue.

  • Once case is assigned into Queue, Create a case team member (via flow) for that Case and add that created user is a case team member with Read Only access. (Note: It's only allow to view that case record for that case owner)

  • If case created user need to edit once after Case assigned into Queue means, add the case created user as into Case team member with Read/Write access.

Note: Please Choose the case created user's access based on your requirement from above 2 options.

Thanks.

3
  • thanks for your comments. I agree that lack of access is the most likely reason for this error, but I am still surprised that it presents the same way a validation rule error does, which makes Users think that the Case was not submitted (but it was), which in turn leads to them retrying a couple of times and creating duplicate Cases. I would expect that they should be taken to a new page and be told very clearly "Your record was created but you do not have access to it anymore".
    – JustinF
    Mar 27 at 20:06
  • As for your solution idea... Unfortunately you cannot add a Queue (the Owner) as a Case Team Member. It also wouldn't solve my problem because the person creating the Case is not in the Queue that the Case is being assigned to... that's why they are receiving a permissions error. It might be feasible to add the Case creator (not Owner) as a Case Team Member (I'm discussing this with stakeholders), but I suspect that might not solve the permissions error either, due to the order of excecution and when Salesforce evaluates permissions.
    – JustinF
    Mar 27 at 20:09
  • @JustinF Sorry to make you confuse. What I am trying to say is case owner as "Case's created user". Thanks for point out. I will update my answer which doesn't confuse anyone further.
    – Raj
    Mar 29 at 9:38

You must log in to answer this question.

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