Announcement

Collapse
No announcement yet.

How to add link parent field to new entity

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add link parent field to new entity

    How to add Link parent field to new entity ?

    I have got this https://forum.espocrm.com/forum/deve...rent-add-field. But i didn't get the way to do it. Please help.
    Cheers!
    Nishan.

  • #2
    Please make a few next steps:
    1. From espocrm/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Call.json copy:
    from the field block:
    Code:
    "parent": {
        "type": "linkParent",
        "entityList": ["Account", "Lead", "Contact", "Opportunity", "Case"]
    },
    from the links block:
    Code:
    "parent": {
        "type": "belongsToParent",
        "foreign": "calls"
    },
    2. Paste copied code into appropriate blocks of your new entity in espocrm/custom/Espo/Custom/Resources/metadata/entityDefs/Your-Entity.json
    Note: in the links block "foreign": "calls" change to "foreign": "your-entity".
    3. Make a rebuild.
    4. Reload a web page.
    5. Add new parent field into the layout in Layout Manager.

    Comment


    • Nishan Perera
      Nishan Perera commented
      Editing a comment
      Thank you Max. This works very well
Working...
X