You need to sign in to do that
Don't have an account?
Harish Demo
How can I share/lock records using Apex code
Hi everyone,
I am looking for a code and explanation to learn record sharing or locking in SF using Apex code, can someone help
Thx in advance
I am looking for a code and explanation to learn record sharing or locking in SF using Apex code, can someone help
Thx in advance
http://blog.jeffdouglas.com/2009/11/25/programmatically-creating-sharing-rules-with-apex/
All Answers
Sharing using Apex: https://www.jitendrazaa.com/blog/salesforce/apex-based-sharing-in-salesforce/
Locking: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_locking_statements.htm
Thanks
Vinod
Hi Harish,
You can refer to this article.
https://developer.salesforce.com/page/Using_Apex_Managed_Sharing_to_Create_Custom_Record_Sharing_Logic
Regards,
Avishek
http://blog.jeffdouglas.com/2009/11/25/programmatically-creating-sharing-rules-with-apex/
Here is an example of Class and Test Class.
Change the Code accordingly.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm