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
Sfdc@SmithaSfdc@Smitha 

How to give permissions on the records based on the condition?

Hi

 

Interview question:how to give permissions on the records baaed on the conditions ?

Ex:product__c is an object in that amount__c is a filed 

 

if amount>100000 then only that records has to be seen to the particular user 'X'

if amount <100000 then only that records has to be seen to the particular user 'Y'

how can do this on e?Can anybody help me?

 

BharathimohanBharathimohan

Hi Smitha,

 

1. Create two Queues namely "X" and "Y" add the Users to the Queue, one in each queue

2. Make your Object as Private in in the Org-Wide Defaults settings.

3. Create two Sharing rule to share the Records to the Queues by using  the below path

 

     Setup | Administration Setup | Security Controls | Sharing Settings | Product__c

 

4. First Sharing Rule Type should be Based on Criteria such that if Amount__c>100000 then share to Queue X

5. Second Sharing Rule Type should be such that if Amount__c<100000 then share to Queue Y

   

 


 

Let me know in case of any queries.

 

Please mark this post as solved, if it helps you.

 

Regards,

Bharathi

Salesforce For All

Sfdc@SmithaSfdc@Smitha

Thanku bharathi for your reply

 

I tried this one but in case oof creating  sharing rule type on product__c object such that the condition is given(based on criteria) there is no option to select the queues

Based on  record owner option is selected then only queues should be selected but when condition given how to assign queue 'X'