Q. If user has view access on report folder but in profile he does not have access to dashboard then will user be able to access the dashboard?
A. No, On the profile level user should have View Dashboards in Public Folders– “View and access dashboards in public folders, which does not include others’ personal folders” apart from view access at report level for him to view the dashboard.
Q. Can we access Lookup / Formula fields in the sharing rule?
At present Lookup fields and formula fields are not allowed in sharing rules. Due to which duplicate text fields need to created and maintained.
It is still an open Idea
Q How to trigger Sharing rule of Formula field?
Sharing rule does not let you use formula fields in the rule criteria, but workaround is to replace the formula field with a regular field and put the formula that populates it into a workflow that fires whenever an object is created or edited.That way you’ll have a regular field with the same value.
example- There is a city (formula field) on Student_c object and we need to use that in the criteria that when City = ‘Delhi’ then share with Sales Support role. Now because we cannot access formula field in the sharing rule so we will create another field on student object, lets say CityValue. Now we will create a workflow that whenever City (formulaField)= ‘Delhi’ then fieldUpdate CityValue (TextField) to ‘Delhi’. Then access the CityValue field in the Sharing rule.
Q. What is apex managed Sharing?
Apex managed sharing provides developers with the ability to support an application’s particular sharing requirements programmatically through Apex or the SOAP API. Only users with “Modify All Data” permission can add or change Apex managed sharing on a record. Apex managed sharing is maintained across record owner changes.
Q. What is a share object?
Every object has a share object .Share object is a junction between your object and the user you want to share the record .To access sharing programmatically, you must use the share object associated with the standard or custom object
For example, AccountShare is the sharing object for the Account object
Note: Objects on the detail side of a master-detail relationship do not have an associated sharing object.
Q. Can we create Share object for custom object?
We cannot create “__share” object by yourself. System create it for us. If sharing setting of an object is “Public Read/Write” system will not create “__share” object, as there is no scope of sharing, all record is open to everybody in org. However, if sharing setting of object is either “Public Read Only” or “Private“, system itself create a “__share” object for us.
Q. Case object has OWD set to private. Now regardless of hierarchies, like top to down (e.g. manager can view lead cases), down to top (e.g. lead can view manager cases), and horizontal (e.g. lead can view lead cases), and cross functionally, all cases should be visible to anyone without change in OWD. How is this possible?
Create a criteria based sharing rule where give access to “Roles and subordinates” to the head of department , this will let everyone access case regardless of hierarchy.