Announcement

Collapse
No announcement yet.

Change type of entity to get activities, history and tasks

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

  • #16
    try to copy it again

    Comment


    • #17
      Hi Tanya,

      Okay, I have and attached is a screenshot of my set up. I rebuilt and cleared the cache after saving the workflow, found a contact linked to an academy sponsor, added a call, saved the call, did a full refresh of the page and the call is still showing the parent as the contact, not the academy sponsor.
      Attached Files

      Comment


      • #18
        correct name of entity is AcademySponsor (no space). fix it

        Comment


        • #19
          Hi Tanya,

          I've changed that, still no luck.
          Attached Files

          Comment


          • #20
            Let's read your rule...
            After Contact created and if Contact has Sponsor, set the parent for all related calls...
            BUT
            1. How many related calls could have just created Contact?
            2. Does Call entity have a link field with the name 'contact'?

            Comment


            • #21
              Hi guys,

              Can anyone say if this is still the right method to change a base entity to base plus? I have just tried it but it didn't work, it stopped my base entity from loading at all (404 error) so had to restore a backup in the end. Many thanks..

              Originally posted by tanya View Post
              Hello,

              1. Extend links in your entityDefs (custom/Espo/Custom/Resources/metadata/entityDefs/{EntityName}.json > links > tasks, calls, meetings, other custom event entities)
              https://github.com/espocrm/espocrm/b...yDefs.json#L58 (you can copy and paste it)

              2. Add your entity to parent list with Entity Manager > {each Event entity} > parent > add your entity to the list.

              3. Add to your clientDefs sidePanel definition (custom/Espo/Custom/Resources/metadata/clientDefs/{EntityName}.json > sidePanels)


              4. Administration > Rebuild > Refresh the page

              Comment


              • #22
                Hello, yes, I did it a few times already and it worked. If you try again and have the error again, please look into the log files in data/logs.

                Comment


                • #23
                  Thanks for your reply shalmaxb.. I have tried again and am getting the following error in the Espo log:-

                  Code:
                  [2021-05-24 15:56:48] ERROR: Json::decode():Syntax error [] []
                  [2021-05-24 15:56:48] EMERGENCY: Syntax error in custom/Espo/Custom/Resources/metadata/clientDefs/Contracts.json [] []
                  Here is the content of my Contracts.json file in clientDefs:-

                  Code:
                  {
                  "controller": "controllers/record",
                  "boolFilterList": [
                  "onlyMy"
                  ],
                  "color": "#170d61",
                  "iconClass": "fas fa-file-contract",
                  "kanbanViewMode": false
                  "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"
                  }
                  ]
                  }
                  }
                  Sorry about the spacing in the contents, the spacing seems to get removed when I paste the text in to the forum edit box. I have compared this to the code link tanya's link and there are a couple of lines extra in mine which were not added manually, apart from that I can't see any difference.

                  Many thanks.

                  Comment


                  • #24
                    I found the error, it was a missing comma on the following line:-

                    Code:
                    "kanbanViewMode": false
                    When I look at my Contracts entity in entity manager it still shows as 'Base', is that a problem?

                    Many thanks.

                    Comment


                    • #25
                      no, the name should not be a problem

                      Comment


                      • #26
                        Ok great, many thanks shalmaxb..

                        Comment

                        Working...
                        X