I have custom object lets call it as items.

  1. Items may or maynot have cases associated with it. There can be more than one case associated to an item.
  2. All cases may or maynot have items associated with it.

I need to show on the cases object related lists to show all items related to that case and in the items object show all cases associated to this item.

How would i have to set the relationship between these objects



You have to create one look-up of case on your item object and one look-up of item on Case object. By doing this , you can associate one or more cases to a single item and one or more items to a single case.

It will automatically show related cases/items in related lists.

  • But this would associate only 1 case with 1 item right. There can be multiple cases associated with an item. For example i create a new case and select itemA . What this would do is have related list on itemA with the new case now created. In the items's related list i dont have itemA listed. I need it to show on case object to also display the itemA in the related list. Not sure if this is possible
    – Prady
    Jan 18 '13 at 6:46
  • To associate more than one case to a single item , you have to add that item on all the related cases . Similarly , to associate more than one item to a single case , you have to add that case to all related items. For eg. Suppose there is a case C1 and you want to associate this case to items IT1 and IT2 , then you have to add this case to these items only.
    – S.Sharma
    Jan 18 '13 at 6:53
  • got it:) .. Need a big mug of coffee..
    – Prady
    Jan 18 '13 at 6:58

Contrary to Sharma's answer I would really suggest you to use a relationship object for this. Create a new custom object (ie. CaseItem) with a lookup field to Case and a lookup field to Item. That way you can really have a many-to-many relationship. Shankar's solution could work in your case but you will run into problems, for instance if you want three different cases to have a relation to the same two or three items.

For the related lists; in the Item and Case objects you can add a related list with ItemCases. In the Case object only show the Item column of the ItemCase in that related list an in the Item object only show the Case column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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