- Salesforce Advanced Administrator Certification Guide
- Enrico Murru
- 542字
- 2021-06-24 12:24:08
Working with sharing rules
Like any other sharing method other than OWD, sharing rules cannot restrict access to records.
To create a new sharing rule, go to Setup | Security | Sharing Settings, choose an object in the Sharing Rules section, and click the New button:

There are two different kinds of sharing rules:
- Owner-based: Record identification is based on ownership; for example, you can share an owned record with a given role or group
- Criteria-based: Record identification is based on the record's fields; for example, you can share a record that has the Internal Division custom field set to Utilities.
Another thing to remember is that although criteria-based rules use record fields to calculate sharing and not its owner, role and territory hierarchy could still take place (if it's not been disabled for custom objects).
The following field types can be used for criteria calculation:
- Auto number
- Checkbox
- Date
- Date/time
- Lookup relationship (for the user ID or queue ID)
- Number
- Percent
- Phone
- Picklist
- Text (case-sensitive)
- Text area (case-sensitive)
- URL
If a field type you need for the criteria is not supported, create a workflow or trigger to copy that value into a text/number field.
You can even apply filter logic to create more complex criteria.
After you have decided which type of sharing rule you want to create, select the categories of users to share with (for example, roles, territories, or groups) and the sharing access level:
- Private: This is only available for associated contacts, opportunities, and cases (for example, Account Sharing Rule).
- Read only: Reads a record.
- Read/Write: Reads and updates a record.
- Full Access: Reads, updates, deletes, transfers, and shares records (just like its owner).
Once a rule has been created, the Share with value cannot be updated.
Here is an example of an Account Sharing Rule:

It shares accounts with the Billing City of Pirri or Sestu that are in an Active state to users in the Eastern Sales Team role, giving them Read Only access to the account and the related contact, case, and opportunity objects (they are specific to the account object).
The following are some considerations about sharing rules:
- If you have multiple sharing rules for a given record, the widest rule is actually applied.
- You cannot add high-volume users to sharing rules because they don't have a role.
- Sharing rules apply to all records (new and old) and are applied to active and inactive users.
- Sharing rules are also recalculated every time a user enters/exits a role, a territory, or a group or when a user transfers the record to another user.
- Because sharing calculation can take a while, Salesforce puts in a background calculation job and notifies the user with a system email when the calculation is ready.
- Lead sharing rules don't apply to account, opportunity, and contact objects that are generated after lead conversion.
- Project 2007項目管理實用詳解
- R Data Mining
- MCSA Windows Server 2016 Certification Guide:Exam 70-741
- 21天學通C#
- 統計策略搜索強化學習方法及應用
- 具比例時滯遞歸神經網絡的穩定性及其仿真與應用
- Apache Superset Quick Start Guide
- Linux:Powerful Server Administration
- Troubleshooting OpenVPN
- 工業機器人運動仿真編程實踐:基于Android和OpenGL
- 單片機C語言程序設計完全自學手冊
- Hands-On Data Warehousing with Azure Data Factory
- 在實戰中成長:C++開發之路
- 寒江獨釣:Windows內核安全編程
- Linux Shell Scripting Cookbook(Third Edition)