relationshipPanels - Add new for Account

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kyle
    Senior Member
    • May 2020
    • 143

    relationshipPanels - Add new for Account

    Hi,

    I have a new entity that is a child of account (1:M) I would like to use the relationshipPanels option in clientDefs for account to add this item to the account view. When i do this the Child item does not appear on the accounts view however when I update the bottomPanelsDetail.json for accounts it shows up (expected) however the option defined in the relationshipPanels to turn off select is working. So it appears the ClientDef is being loaded however the bottomPanelsDetail.json file that is defined in the base system prevents the new panel showing up. Can I add a panel to the bottomPanelsDetail.json from the extension without having to override the whole file?


    1) ...\Resources\layouts\Account\relationships.json


    PHP Code:
    [
        "__APPEND__",
        "myChild"
    ] 
    
    2) ...\Resources\metadata\clientDefs\Account.json

    PHP Code:
    {
        "relationshipPanels": {
            "myChild": {
                "select": false,
                "create": true
            }
        }
    } 
    
    3) ..\Resources\metadata\entityDefs\Account.json

    PHP Code:
    {
        "fields": {
            "myChild": {
                "type": "linkMultiple",
                "layoutDetailDisabled": true,
                "layoutMassUpdateDisabled": true,
                "noLoad": true,
                "importDisabled": true
            }
        },
        "links": {
            "myChild": {
                "type": "hasMany",
                "foreign": "account",
                "entity": "MyChild",
                "audited": false
            }
        }
    } 
    
    Any help would be appreciated.
    Last edited by Kyle; 09-30-2020, 01:28 AM.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hello,
    Relation sub-panel supports the link-multiple connection. You can add this pannel through Administration -> Layout Manager -> Account -> Bottom Panels.
    Do you try to add a single-link connection to it?

    Comment

    • Kyle
      Senior Member
      • May 2020
      • 143

      #3
      Thanks for your suggestion however this creates a whole bottomPanelsDetail.json that contains everything, ideally what I want is to add one item and have it merge to the existing definition. I will not always know what items people will want under account so I don't want to set all the items just add my 1.

      Comment

      • Maximus
        Senior Member
        • Nov 2018
        • 2731

        #4
        Got it. Unfortunately, I can't help you. It requires coding skills. It seems that you need to create your custom view for your bottom panel https://docs.espocrm.com/development...record-panels/. Hope someone developers in the Developers branch might help you.

        Comment

        Working...