Below is our scenario
We have a custom case object. where ownership is based on queues.
Users are assigned to queues and any user part of a queue gets access to all the cases assigned to the particular queue.
We have a scenario where particular user of the queue can go for a court trial for that case. In that case all other members except for the trial user needs access to the case.
If we remove the user from the queue he will lose access to all other cases assigned to that queue.
If we remove access to the queue for that case then all members of queue lose access to the case.
The solution we came up was to find all users who have access to the case, remove queue based access and then insert user share records for all users except for trial user using apex sharing.
We have millions of cases and queues can have up to 1000 users.
- Is this solution scalable?
- Is there a better solution for this scenario?
- Is there any way we can do it through configuration instead of code?