Announcement

Collapse
No announcement yet.

Custom entity + Activities/History/Tasks panel not displaying data automatically

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

  • Custom entity + Activities/History/Tasks panel not displaying data automatically

    Hello, I just created myself a new entity - Candidate based on Person template. I edited custom/Espo/Custom/Resources/metadata/clientDefs/Candidate.json definition (added
    "sidePanels":{
    "detail": [
    {
    "name":"activities",
    "label":"Activities",
    "view":"crm:views/record/panels/activities",
    "aclScope": "Activities"
    },
    {
    "name":"history",
    "label":"History",
    "view":"crm:views/record/panels/history",
    "aclScope": "Activities"
    },
    {
    "name":"tasks",
    "label":"Tasks",
    "view":"crm:views/record/panels/tasks",
    "aclScope": "Task"
    }
    ],
    "edit": [

    ],
    "detailSmall": [

    ],
    "editSmall": [

    ]
    },
    -> this leads to displaying panel on the detail's page right side.

    I then updated entityDefs json, added links:
    "meetings": {
    "type": "hasMany",
    "entity": "Meeting",
    "foreign": "candidates",
    "layoutRelationshipsDisabled": true
    },
    "tasks": {
    "type": "hasChildren",
    "foreign": "parent",
    "entity": "Task",
    "layoutRelationshipsDisabled": true
    },
    "cases": {
    "type": "hasMany",
    "entity": "Case",
    "foreign": "candidate"
    },
    "emails": {
    "type": "hasChildren",
    "entity": "Email",
    "foreign": "parent",
    "layoutRelationshipsDisabled": true
    },
    "calls": {
    "type": "hasMany",
    "relationName": "candidateCall",
    "foreign": "candidates",
    "entity": "Call",
    "isCustom": true
    }

    But when I send an email to the Candidate (or add a task) it is not automatically displayed in the Activities, how can I achieve so that it will be automatically displayed, how it works already in Accounts, Contacts and Leads?

    Thank you!

  • #2
    Hi,

    Debug in application/Espo/Modules/Crm/Services/Activities.php
    getActivities method

    Comment


    • #3
      What shall I debug there?
      Is it to somehow connected to client\modules\crm\src\views\case\record\panels\ac tivities.js (there is mention just for account, contact, lead)?

      Comment


      • #4
        Did you check the parent Relationship of Emails & Tasks?

        Code:
                "parent": {
                    "entityList": ["Account", "Lead", "Opportunity", "Case"]
                }
        i believe this should be extended as well to

        Code:
        ["Account", "Lead", "Opportunity", "Case", "Candiate"]

        Comment

        Working...
        X