Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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 Feb 22 '13 at 16:16
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.