function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sumit@TCSSumit@TCS 

sharing Rule :- Hide cases based on Product

In Specific country there will be two set of different profile users working in parallel for a period of time and suppose both of them need to use same application, they’ll handle different product, is it possible to limit those users to  access in application by product? As there will be risk if they can see each other’s case records in application. They are

In specific country, two vendors working parallel for two different products. We need to hide their cases from each other based on products.

Products:-  access of set of products(P1) for Countrry C1
Users :-   Different profile users can view only those cases related to P1

More Info - Suppose we have two set of vendors V1 and V2 and they have access on products P1 and P2.

Vender V1 created a case C1 and V2 created C2. we need to hide case C2 (created by V2)  from V1 and vice
Best Answer chosen by Sumit@TCS
ShashForceShashForce
You cannot restrict access further in salesforce. You can only expand access from the most restricted level. Hence, you can try setting the organization wide defaults for cases as private and use sharing rules to give access only to the applicable users.

All Answers

Dev.AshishDev.Ashish
Sumit,

First of all sharing rules work on role basis not on profile basis. So you need to have V1 and V2 roles for corresponding users belongs to profiles for V1 and V2.

Now to restrict users belongs to Role V1 to case C1 only you can have a field (let's say 'User_role_for_shareing__c') on Case which identify users and role he has, this field will have value CV1 if case is created by user having role V1, CV2 in other case. Now enable sharing based on the field 'User_role_for_shareing__c' and its value.

Try and let us know if you face issues.
ShashForceShashForce
You cannot restrict access further in salesforce. You can only expand access from the most restricted level. Hence, you can try setting the organization wide defaults for cases as private and use sharing rules to give access only to the applicable users.
This was selected as the best answer