+ Start a Discussion
Satya Ranjan MohantySatya Ranjan Mohanty 

If OWD is private for a object can we give access to that object through code i mean apex class or trigger.

Pradeep SinghPradeep Singh
Yes you can share records using apex sharing. Please go through the below link.
Satya Ranjan MohantySatya Ranjan Mohanty
Hi Pradeep,

Thank you quick responce
can i give access to a paticuklar profile and role 

Pradeep SinghPradeep Singh
Yes you can do this, just create a public group and add roles and then use the id of the group for UserOrGroupId field.