I have sObject for example Account, with records.

And two users John and Jack.

I want show to this users part of records, by using criteria.

Something like, John show records with Account.Name = Zara,

and Jack show records with Account.date=something

How it possible?

How do this from triggers.


Organization-wide sharing defaults set the baseline access for your records. You can set the defaults separately for different objects.

You need to set Organization-Wide Sharing setting as Private for Account and need to open up Access to Account record using Criteria-based sharing rules.

Criteria-based sharing rules determine whom to share records with based on field values in records.

OWD Settings

Criteria-based sharing

| improve this answer | |

Here is how you can achieve it.

  1. make account object private
  2. create sharing rule as per your criteria. for ex. Account.Name = Zara then share record with John
  3. Create other sharing rules as per your requirements
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.