I'm wondering if a developer creates a share record via the Apex, can an admin see it via the UI?

Example: A developer created code to share accounts on created/edit to a group of people and John is one of them. Let's say the account Go-Go-gadget was shared with John via Apex. Can an admin go to the account, Go-Go-gadget, click on the Sharing button and see why/what shared this account with John?

2 Answers 2


Yes, it shows up as "Manual Sharing" in the UI and "Manual" in the API as the reason. Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm

"Manual shares written using Apex contains RowCause="Manual" by default. Only shares with this condition are removed when ownership changes."

enter image description here

  • Dan, it's funny you posted that source, for that is what I was reading which prompted my question. I didn't put 2and2 together for 'Manual shares written using Apex contains RowCause="Manual"' as what was in the UI. Thanks
    – Fifedog
    Jan 9, 2017 at 20:26
  • No, problem I use manual sharing all over the place so I know a bit about it. The screenshot is what an apex group share and a org wide sharing rule look like together for one of my records. As Adrian said anyone who can click the sharing button can see the shares there be in manual, apex share or global share. Jan 9, 2017 at 20:30
  • 1
    Note that with custom objects, you can create manual shares with custom reasons.
    – Adrian Larson
    Jan 9, 2017 at 20:33

Yes, manual shares show up when you visit the Sharing button. As for the code itself, anyone with the Author Apex permission can view it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .