Model related via join object not showing data

  • 1
  • Problem
  • Updated 3 years ago
I have a very complex opportunity detail page. There are nine related objects, all with their own tabs. Three of those related objects are joined to the Opportunity via join objects. Two of those objects are working fine, but this third object isn't.

What I'm trying to do is to display in a table data from the related object, not the join object. Our opportunity is a Loan, and the three related objects are Borrowers, Properties, and Title Reports.

Borrowers are a record type of Account, and are joined to the opportunity via the Borrower Join custom object. My BorrowerAccount model has a condition of Account ID is in the BorrowerJoin model's Account field. The BorrowerJoin model has a condition of Opportunity lookup field is in the Opportunity model's ID field. On the Borrowers tab I can display data from the model BorrowerAccounts, and directly edit the accounts. 

Properties are a custom object, related to opportunity via the PropertyJoin custom object. My Property model has a condition of Record ID is in the PropertyJoin model's Property lookup field. The PropertyJoin model has a condition of Opportunity lookup field is in the Opportunity model's ID field.  On the Properties tab I can display data from the model Property, and directly edit the properties. 

Title Reports are a custom object, related to opportunity via the TitleReportJoin custom object. My TitleReport model has a condition of Record ID is in the TitleJoin model's TitleReport lookup field. The TitleJoin model has a condition of Opportunity lookup field is in the Opportunity model's ID field.  On the Title Report tab I cannot display data from the model TitleReport - I can only display data from the TitleJoin model.

Any ideas why a third data model set up the same way would fail?


Photo of Jack Sanford

Jack Sanford, Champion

  • 8,270 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Sounds to me like no TitleReports are being loaded.  Use Javascript to debug the data that is actually in the model.  Open the browser console and type 

skuid.$M('TitleReport').data   

This will show you if data is actually being loaded.  

If nothing is there - then you need to follow the chain up through the Join object.  I often get messed up because I try to use the RecordId from the junction object, rather than the TitleReportID value. 

One other thing.   Model order is going to be important.  The Join model should appear BEFORE the Title Report model, because it has be queried before the report model (so that its Id's area availalbe....)

Hopefully you can get this running like you want.  It should be totally doable. 
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,270 Points 5k badge 2x thumb
I had no idea the order of the models made a difference! That fixed it. Thanks