I wanted to have an ability to associate an case with an opportunity. So i created a lookup field on cases to opportunity and added the cases related list in opportunity page layout.

The issue i am facing is that when i add a new case for a opportunity lets call it OppA. I can see that case reflected on the cases related list of OppA. If there is another opportunity(OppB) using the same account, this case is visible on that opportunity as well. Is this a standard behavior? Should i need to write a custom code to get only cases related to a particular opportunity?

Account used is a Person account( Not sure if that makes a difference)

  • Prady, Look into the way Person Accounts are implemented : they are essentially an Account and a Contact. This may explain the strange behaviour observed due to the Contact part, as explained in Ralph´s answer.
    – altius_rup
    Commented Nov 30, 2013 at 6:24

2 Answers 2


There is a standard Cases related list available for Opportunities that shows all Cases for the Opportunity's Account (http://help.salesforce.com/apex/HTViewSolution?id=000004153&language=en_US). You probably added that related list to the Opportunity layout instead of your custom one. Edit the layout and see if there isn't another Cases related list there that you can add - that'll be your custom one. You might want to edit your custom lookup field and change the name of the Related List Label to differentiate it from the standard one.


That's pretty strange. There is some magic for contacts, in that things show up in the related list if they're related directly to the account, or related to a contact/case/opportunity for the account. The classic example is an opportunity. For objects that have a lookup to a contact an account, such as a case, you could see a Case show up in two places if it's related to a contact that's part of AccountB (via Case.ContactId), and directly related to AccountA (via Case.AccountId).

However, I'm not aware of any magic for Opportunities. If you defined the lookup, you should only see your case show up in the related list for one opportunity, since by definition, lookups are one to many.

You must log in to answer this question.

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