function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jothi EswaranJothi Eswaran 

How to control lead records level access for below criteria

Two Scenarios i need  to implement
1. ProfileA should have access only to leads created by them and not others
2. Incase lead owner is changed to other owner, then creator of the lead can still have read only access to their records
GauravendraGauravendra
Hi Jothi,

I don't think there are sharing setting which will allow you to share records based on the users in the profile.
  1.     You can create a public group for all the users in the ProfileA and create a sharing rule to share the records owned by this public group with the same public group.
  2.     I think you need to implement Apex Sharing (LeadShare) in the lead trigger.

Hope this helps!