Access modifiers are used in apex class in salesforce. Similar to Java programming, Salesforce supports 4 different access modifiers in salesforce.
- private
- protected
- public
- global
Access modifiers are used in apex class in salesforce. Similar to Java programming, Salesforce supports 4 different access modifiers in salesforce.
When you want to share a record through apex sharing you can provide custom reason so that it will give a meaningful reason to why the record is shared with a specific user or group.
Custom sharing reason is only available for custom objects and you can set custom sharing reason in salesforce classic version only.
Continue reading “Apex Sharing Reason in Salesforce”There will be some scenarios in organization where you want to share a record based on some complex scenario, but you cannot define the complex scenario as a criterion in sharing rule. Then the question is how you can share a record, of course you can share them manually. But how many times you can share records manually, trust me its annoying to share records manually again and again.
Salesforce provides another way to share a record and that is through apex code via share object. So what is Share object? Every standard and custom object will have a share object in salesforce with predefined fields as shown below.
There will be some scenarios where all records are privately owned, you want to share records based on some criteria with a specific user or group of users or to specific role. In such cases sharing automation should work on all records of that object. You can build a sharing rule which will handle such situation.
Consider a scenario where records should be shared based on continent field and those records should be shared with people of specific group or role. You can simple create sharing rules for each continent and share according to business requirement.
Continue reading “Sharing Rules in Salesforce”Consider a scenario where security setting is too restrictive in your org. If there is a need to share some specific record with only couple of users or group and that too for one time sharing, instead of changing OWD setting or profile level setting or creating a permission set you can share those records manually directly from records detail page.
Continue reading “Manual Sharing in Salesforce”