You need to sign in to do that
Don't have an account?

Apex Sharing rule on personal/public group of a user
Hi All
How can i share the record using apex sharing on the personal group? In user level, i am adding the personal group for sharing the record.is it possible ?
How can i share the record using apex sharing on the personal group? In user level, i am adding the personal group for sharing the record.is it possible ?
I trust you are doing very well.
You can share a record using Apex with a User, Public Group or Role. Below is the sample code for sharing of an Account record with a user.
Please refer to the below links which contains sample code for Apex sharing.
http://sfdcsrini.blogspot.com/2015/01/what-is-apex-sharing-how-to-share.html
https://sfdcfanboy.com/2015/11/27/apex-based-sharing-records-with-roles/
https://www.jitendrazaa.com/blog/salesforce/apex-based-sharing-in-salesforce/
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.
Thanks and Regards,
Khan Anas