Relationship Panel is not displayed for Many-to-Many Relationship with Custom Entity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • angolphs
    Junior Member
    • Apr 2025
    • 1

    Relationship Panel is not displayed for Many-to-Many Relationship with Custom Entity

    I have a custom entity name "Lender" (plural: Lenders), that has Many-to-Many relationship with Opportunities and with Contacts.
    I'm having trouble displaying the Relationship Panel under either Opportunity or Contact, and vice versa.

    In Opportunity layout, I created a custom list named listForLender, type "smallList".
    In Lender layout, i got a custom list named listForOpportunity.

    In /custom/Espo/Custom/Resources/metadata/clientDefs/Opportunity.json I have the following:

    Code:
    {
    "relationshipPanels": {
    "referralContact": {
    "layout": null,
    "selectPrimaryFilterName": null
    },
    "lender": {
    "layout": null,
    "selectPrimaryFilterName": null
    },
    "accounts": {
    "layout": null,
    "selectPrimaryFilterName": null
    },
    "lenders": {
    "layout": null,
    "selectPrimaryFilterName": null
    },
    "cLenders": {
    "layout": "listForOpportunity",
    "selectPrimaryFilterName": null,
    "selectHandler": "handlers/select-related/same-account-many"
    }
    },
    "additionalLayouts": {
    "listForLender": {
    "type": "listSmall",
    "isCustom": true
    }
    }
    }


    However, I cannot see any of the relationship panels displayed. Could you help guide me? Much appreciated.




  • victor
    Active Community Member
    • Aug 2022
    • 864

    #2
    Your code means that you have not selected any Layout for Opportunity (screenshot 1). You may have mistakenly selected Layout for the custom entity, not for Opportunity.

    Click image for larger version

Name:	image.png
Views:	0
Size:	49.1 KB
ID:	117025
    It should be like in screenshot 1 and then in the code you will get the Layout you selected.

    Click image for larger version

Name:	image.png
Views:	0
Size:	21.6 KB
ID:	117026

    Comment

    Working...