You need to sign in to do that
Don't have an account?
hareeshn
how to share a record to role hierarchy using apex and visual force
Hi for example role hierarchy CEO----> projectmanager ---->projectlead
if am sharing a record with projectmanager only CEO and Projectmanger able to see that record not projectlead How to achive this functionality using apex and visual force any ideas will be appreciated thanks
if am sharing a record with projectmanager only CEO and Projectmanger able to see that record not projectlead How to achive this functionality using apex and visual force any ideas will be appreciated thanks
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_bulk_sharing_creating_with_apex.htm
Since your requirement is to share the records to Role rather than user or group, you might need to create a publicgroup and add the users of particular role. This way you can add a groupid which mimics the role. The below post has more information on this.
https://developer.salesforce.com/forums/ForumsMain?id=906F00000008xacIAA
All Answers
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_bulk_sharing_creating_with_apex.htm
Since your requirement is to share the records to Role rather than user or group, you might need to create a publicgroup and add the users of particular role. This way you can add a groupid which mimics the role. The below post has more information on this.
https://developer.salesforce.com/forums/ForumsMain?id=906F00000008xacIAA