Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Scenario: Two custom Objects having a MD relationship as Opportunity Mgmt (Master) - Deal (Detail). I have a Standard User Lookup Field "Solution Lead" in Deal Object. The OWD for Opportunity Mgmt is "Private". The Opportunity Mgmt records will be shared with the Solution Leads via Apex Managed Sharing.

I would like to Filter the Deal Records based on the Logged on User. Show only Deal records on which the Logged On user is the "Solution Lead". How do I achieve this?

share|improve this question
You're questions a little unclear. What do you mean by filter? Do you mean in a list view? Do you mean in a SOQL Query? Do you mean a lookup filter? A little more detail might get this question some more attention – Ralph Callaway Feb 22 '13 at 16:16

Correct me if I'm misunderstanding what you are trying to accomplish, but you essentially want to display a related list on the Opportunity Mgmt record that is filtered to only show records that the current user is the "Solution Lead" of.

Assuming that you have to continue to have the MD relationship between the records, the only way I know how to do that would be to write a VF page that displays the Opportunity Mgmt record detail, with a custom built related list to only display the filtered records. Then you would need to override the standard page with the custom VF page, for the Opportunity Mgmt object

If you were able to get away from MD relationship, then you could update your Deal object to private. Then update your apex sharing rule to give users access to only the parent and child records they need.

Hope that makes sense.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.