welcome to XRM blog

Keep in touch with latest CRM/ERP articles

To remain competitive your organisation must be efficient across the business process spectrum. To do so you need to take sound decisions based on a balance between the cost and risk. To do so you will be heavily dependent on your content management in itself needs...

image
Blog

Ultimate Guide to User Profile, Permission Sets, Organization-Wide Defaults, Role Hierarchy & Sharing Rules in Salesforce

By Vikas Sain on 5/27/2025

Salesforce provides a layered security model to ensure that the right people have the right access to data while maintaining data privacy and confidentiality. 

This security model is broadly divided into 2 major categories: 

1. Object Level Security: in Salesforce controls access to specific objects for users. It defines what actions a user can perform on an object like Create, Read, Edit, and Delete (CRUD). If users don’t have access to an object, they cannot see its records in the system at all. 

Components under Object Level Security: 

 Profiles — Basic level access to objects and tabs. Controls CRUD permissions for objects. 

 Permission Sets — Provide additional object-level access without changing the user’s profile. 

 Permission Set Groups — Combine multiple permission sets for easy management. 

 Field Level Security — Controls access to individual fields within an object. You can hide sensitive fields from users even if they have access to the object. 

2. Record Level Security (What records within an object a user can access): 

Record Level Security controls a user's ability to access specific records within an object. Even if a user has access to an object, record-level security determines which individual records they can view, edit, transfer, or delete. 

Components under Record Level Security: 

 Organization-Wide Defaults (OWD) — Set the baseline level of record access for all users in the org (Private, Public Read Only, Public Read/Write). 

 Role Hierarchy — Allows users higher in the role hierarchy to access records owned by users below them. 

 Sharing Rules — Automatically grant additional record access based on criteria or ownership. 

 Manual Sharing — Record owners or admins can share individual records with specific users or groups. 

 Apex Sharing — Programmatically share records using custom code based on business logic. 

How To Setup These In Salesforce CRM 
1. User Profiles 
Profiles define what users can do in Salesforce, including object permissions, field-level security, page layouts, apps, and more. 
Steps to Set Up User Profiles: 
1. Navigate to Setup → Users → Profiles. 
2. Clone a standard profile or create a new profile. 
3. Configure: 
   - Object permissions (CRUD) 
   - Field-level security 
   - Tab visibility 
   - Record Types 
   - Page Layout assignments 
4. Assign the profile to users while creating or editing a user record. 
2. Permission Sets 
Permission Sets provide additional access to users without changing their profile. They are additive. 
Steps to Set Up Permission Sets: 
1. Navigate to Setup → Users → Permission Sets. 
2. Click 'New' and define the label and description. 
3. Configure: 
   - Object settings 
   - Field permissions 
   - System permissions 
   - App permissions 
4. Assign the Permission Set to users by selecting Manage Assignments → Add Assignments. 
3. Organization-Wide Defaults (OWD) 
OWD controls the baseline level of access to records for all users in the org. 
Steps to Configure OWD: 
1. Navigate to Setup → Security Controls → Sharing Settings. 
2. For each object, choose the default access level: 
   - Private 
   - Public Read Only 
   - Public Read/Write 
3. Save your settings. 
4. Role Hierarchy 
Role Hierarchy in Salesforce allows higher-level users to access the records owned by lower-level users in the hierarchy. 
Steps to Configure Role Hierarchy: 
1. Navigate to Setup → Users → Roles. 
2. Define roles based on your organization's structure. 
3. Assign users to the appropriate roles. 
4. Higher roles automatically inherit access to records owned by users in lower roles. 
5. Sharing Rules 
Sharing Rules extend access to users based on record ownership or criteria. 
Steps to Create Sharing Rules: 
1. Navigate to Setup → Security Controls → Sharing Settings. 
2. Select the object for which you want to create sharing rules. 
3. Click 'New' under the appropriate section. 
4. Define the criteria or owner-based rule. 
5. Select users, roles, or public groups to share with. 
6. Define access levels (Read Only / Read/Write). 
7. Save the rule. 

6. Apex Sharing 

Apex Sharing allows developers to programmatically share records based on complex business logic using Apex code. 

Steps to Implement Apex Sharing: 

1. Set the Organization-Wide Default (OWD) for the object to Private or Public Read Only. 

2. Navigate to Setup → Object Manager → Select the desired object (Standard or Custom). 

3. Confirm "Grant Access Using Hierarchies" is enabled if applicable. 

4. Identify the Share Object for your target object (Example: AccountShare for Account, CustomObject__Share for Custom Object). 

5. Write an Apex class or trigger to create sharing records. 

6. In the code, create a new instance of the Share Object. 

7. Set the following fields: 

- ParentId → ID of the record to be shared. 

- UserOrGroupId → ID of the User, Role, or Group to share with. 

- AccessLevel → Define as 'Read' or 'Edit'. 

- RowCause → Define reason for sharing (Manual, Owner, etc.). 

8. Insert the Share Object record using DML statement.

9. Deploy the Apex class or trigger. 

#ApexSharing
#CRMSetup
#OrganizationWideDefaults
#PermissionSets
#RecordLevelSecurity
#RoleHierarchy
#SalesforceAdmin
#SalesforceSecurity
#SharingRules
#UserProfiles
Author
Blog Calendar
Blog Calendar List
2025 Jun  18  5
2025 May  47  9
2025 Apr  34  6
2025 Mar  54  7
2025 Feb  41  6
2024 Nov  11  1
2024 Aug  7  1
2024 Apr  58  4
2024 Mar  159  4
2024 Feb  442  3
2024 Jan  33  7
2023 Dec  40  6
2023 Nov  583  5
2023 Oct  798  12
2023 Sep  1873  9
2023 Aug  571  6
2023 Jul  47  6
2023 Jun  26  4
2023 May  44  5
2023 Apr  86  5
2023 Mar  226  6
2023 Feb  174  5
2023 Jan  83  4
2022 Dec  96  7
2022 Nov  294  2
2022 Sep  13  1
2022 Aug  32  2
2022 Jun  11  2
2022 May  6  2
2022 Apr  12  2
2022 Mar  2  1
2022 Feb  2  1
2022 Jan  1  1
2021 Dec  4  1
2021 Nov  2  1
2021 Oct  2  1
2021 Sep  14  1
2021 Aug  49  5
2021 Jul  51  4
2021 Jun  1871  5
2021 May  43  3
2021 Apr  2264  3
2021 Mar  215  5
2021 Feb  2780  7
2021 Jan  4209  9
2020 Dec  587  7
2020 Sep  80  3
2020 Aug  790  3
2020 Jul  139  1
2020 Jun  99  3
2020 Apr  103  3
2020 Mar  19  2
2020 Feb  34  5
2020 Jan  48  7
2019 Dec  17  4
2019 Nov  40  1
2019 Jan  23  2
2018 Dec  144  4
2018 Nov  68  3
2018 Oct  18  3
2018 Sep  1279  11
2018 Aug  7  2
2018 Jun  21  1
2018 Jan  73  2
2017 Sep  590  5
2017 Aug  17  1
2017 Jul  17  2
2017 Jun  65  2
2017 May  21  1
2017 Apr  39  2
2017 Mar  140  4
2017 Feb  857  4
2016 Dec  208  3
2016 Nov  1074  8
2016 Oct  342  10
2016 Sep  811  6
2016 Aug  39  1
2016 Jun  1894  6
2016 May  115  3
2016 Jan  72  2
2015 Dec  747  6
2015 Nov  4  1
2015 Oct  13  1
2015 Sep  1471  6
2015 Aug  14  1
2015 Jul  129  2
2015 Jun  11  1
2015 May  20  1
2015 Apr  30  3
2015 Mar  80  3
2015 Jan  5350  4
2014 Dec  18  1
2014 Nov  2260  4
2014 Oct  69  1
2014 Sep  107  2
2014 Aug  5340  1
2014 Jul  49  2
2014 Apr  2600  12
2014 Mar  307  17
2014 Feb  223  6
2014 Jan  1510  16
2013 Dec  21  2
2013 Nov  695  2
2013 Oct  256  3
2013 Sep  13  1
2013 Aug  40  3
2013 Jul  214  1
2013 Apr  62  6
2013 Mar  2398  10
2013 Feb  131  3
2013 Jan  352  2
2012 Nov  62  2
2012 Oct  519  10
Tag Cloud
Interested in our services? Still not sure about project details? get a quote