You need to sign in to do that
Don't have an account?
mddean17
With Apex can sharing rules be approximated using Manual shares?
Hi,
I want to automate Opportunity sharing with Apex and I know I can't create sharing rules programmatically. I'm wondering if I can use manual shares to approximate the behavior of a rule.
I mean, if I add triggers to the creation/deletion of every opportunity, managing a manual share, have I achieved the same result as the rule? Is there anything the rule does that I would be leaving out, like other kinds of recalculations? If it makes a difference, I would be managing the share for a group (role) and not individual users.
Any help is much appreciated.
You should check out Apex Managed Sharing. It was just released and is probably the right solution to your problem.
The section below in the Apex reference guide is a great place to start:
http://www.salesforce.com/us/developer/docs/apexcode/index_CSH.htm#apex_bulk_sharing.htm
Thanks,Andrew