We want to allow our salesmen to see other salesmen's opportunities, but only on related lists (such as on the account detail page). They should not be able to click on the opportunity to see the detail page.

The only approach I'm able to think of is to make the opportunity sharing setting default to "Private" (and give non-salesmen the ability to see them through sharing rules), and then using an embedded Visualforce page on the account detail page. The controller queries all the opportunities and has the "without sharing" keyword, so the salesman can see the opportunities, but would still get an insufficient privileges error if he tries to click on any of the opportunities.

This works but I was just wondering if there are possibly any other or better ways of accomplishing this?

  • Seems like the best approach to me
    – greenstork
    Feb 7, 2014 at 20:11

1 Answer 1


There's no "out of the box" solution for this, because sharing is baked in to the application close to the database level. Any time there's a possibility that a user could see a record, the system always checks the record's access level beforehand, and simply won't show the record if "view" access isn't granted. This includes hovers/popups, list views, reports, and, of course, related lists. Dashboards are only only exception to this rule, and they only generally apply in the sense that users can see aggregated data they won't see if they ran the report. As you have observed, administrators can build Visualforce pages with sharing explicitly disabled to get around that design.


You must log in to answer this question.

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