function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GabeGabe 

one-to-many custom object-to-cases / related list

I have a custom object called "QA Reports." I want a way to associate 1 QA Report with >1 case. It's easy enough to do a 1-to-1 relationship or even have multiple QA Reports associated with a single case.

But I want this to work like solutions - I want to view a single QA Report and see all the cases associated with it.

How do I do this?

salesforce.com support tells me I need to use Cross-Object Formulas. Is that correct? And how do I get started?

Thanks!

-Gabe

werewolfwerewolf
Make a custom junction object, which is just a custom object with 2 master-detail relationships.  Make 1 master-detail to Case and the other to QA Reports.  Then you can add some cross object formula fields to that CJO that get data from either of the 2 parents to display in the related lists.
GabeGabe
Thanks for the quick reply, werewolf! I appreciate it.

So far I've created a new custom object and have added two custom fields - a master-detail to case and a master-detail to QA Reports.

But I'm a little confused on this part:


werewolf wrote:
Then you can add some cross object formula fields to that CJO that get data from either of the 2 parents to display in the related lists.



So I add another custom formula field to my new object... but what's in the formula? Could you provide a sample formula that I could use? I don't have much experience creating formulas yet, aside from playing around with them here and there.

And once this new custom object (the CJO) has the right data, then that's where I'd log new QA Reports? Or in the first custom object I created? And I assume the QA Reports object and Cases would need to pull in the CJO somehow, right?

Thanks again,
Gabe
werewolfwerewolf
In the formula would be extra info you want to display.  By default you'll only see the case number and the QA Report name.  Say you want the case subject in there, then you'd have a formula field in the CJO with Case.Subject, so you could see the subject of the case in the related list on the QA Report page.  Those formula fields are optional anyway.
GabeGabe
Thanks, werewolf. I  think I'm getting there, but am still a bit confused.

The CJO is creating all these unique records such that each case that links to the same QA Report does so through a new CJO record.

I did add additional case details via a formula to my CJO, but how do I get the details of related case numbers (not the CJO record) to show up on my QA Report record?

Likewise, how do I get the name of the QA Report (not the CJO) to display on the case?

Here's what I'm doing:

  1. Create a new QA Report record.
  2. Go to a case and click button to create CJO ("New Case to QA Report") - that's the CJO with master-detail relationships between cases and QA Reoprt custom object.
  3. On new CJO record, select name of report created in Step 1 to associate with this case.
  4. Repeat Step 3 a couple times on other cases to test.
  5. Return to new QA Report record and see all the CJO records at bottom.

What am I doing wrong? How can I see all related cases when viewing the QA Report record?


Thanks,
Gabe
GabeGabe
Any additional thoughts on what I'm missing or what I may be doing wrong here?

Thanks!
GabeGabe
Woohoo! I just figured out the piece I was missing: In page layout on cases and on my custom QA Reports object, I just had to click the CJO and then Edit Properties. Then I could pull in additional data.

Thanks again for pointing me in the right direction.