Announcement

Collapse
No announcement yet.

Question to add relation to tasrgetList - entity person

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

  • Question to add relation to tasrgetList - entity person

    Hello again,

    I've add a n:n relationsship person to targetList. Now I can select and add persons to a targetList - all fine.
    But the field entryCount didn't count the added persons and may be other actions in conjunction with targetList.
    Now gone to the deepth of code :-)
    I found 3 places with codepart 'entryCount':
    • ../application/Modules/Crm/Classes/FieldProcessing/TargetList/EntryCountLoader.php
    • ../application/Modules/Crm//Resources/metadata/clientDefs/targetList.json
    • ../application/Modules/Crm//Resources/metadata/entityDefs/targetList.json​
    I think, only the two last be considered.
    And there are 2 places where entity person is not listed in:
    • ../custom/Espo/Custom/Resources/metadata/clientDefs/TagetList.json
    • ../custom/Espo/Custom/Resources/metadata/entityDefs/TagetList.json
    I don't want to add code to files not be in a quandary.
    What's to do?
    Thanks

    Christoph

  • #2
    Hi ctheuring,

    I just tested this functionality (using a custom entity with the Person type in Target Lists), and the Entry Count field changed immediately (took the value 1) when I selected a specific record of this custom entity. In the same way, the Entry Count field changed immediately (took the value 0) when I unlinked this record. Please see attached screenshots.

    Click image for larger version

Name:	Screenshot from 2023-11-01 14-14-28.png
Views:	103
Size:	23.9 KB
ID:	99303

    Click image for larger version

Name:	image.png
Views:	136
Size:	23.8 KB
ID:	99302

    Please tell me, is there any code customization in your instance? Perhaps you have third-party extensions installed?
    Also, please specify which EspoCRM version you are using.​

    Comment


    • #3
      Hello lazovic,

      thanks for reply.
      My installation runs espo 8.0.3. with extensions
      - Dubas Dark Theme
      - Advanced Pack
      - Outlook Integration - always the current versions - current not used
      There is a non active workflow (to entity verteiler with trigger after record update) for doing the count-job (count all records of persons in entity verteiler) - missing condition and action-formula ... because I didn't know which code.
      I've now found that in ../custom/Espo/Custom/Resources/metadata/entityDefs/TagetList.json persons is listed
      and also
      in ../custom/Espo/Custom/Resources/metadata/clientDefs/TagetList.json ... I did it not, so it must be expand by adding of the relation
      I did not check this AFTER add the relation :-( sorry
      BUT ... the counter is still on 1
      I've delete all persons and users -> the counter shows 0
      Than I've add 3 users -> the couter shows 3
      Than I've add 2 persons -> the count still shows 3
      I think, espo is missing something.
      Could it be useful, to send both json-files by private message?

      Christoph
      P.S.
      and there is the next problem ... I make a new question (I'm working strong on espo :-)

      Comment


      • #4
        ctheuring,

        There is definitely no problem in EspoCRM, I checked again a scenario similar to yours, everything happened again as it should be. Also, I doubt that viewing json files will help in solving this problem.

        Please tell me, is it possible for you to install another EspoCRM instance next to the main instance on your server? Just to check whether the Target List and custom entities binding functionality will work on a completely clean (vanilla) EspoCRM version for you.​

        Comment


        • #5
          Hello lazovic,

          the current installation in running on a virtual VMWare-machine (on a ubuntu-server 22.04), access via a VPN.
          This is a test und training-installtion with not all records to import from the old application used before (for 20 years!).
          We are planing to go online with a production-installation on 1st January 2024. We want to make a copy of the installtion and configuration of this current version.

          It's expensive, to install another instance of espoCRM for not an importend bug or missconfiguration (for us). We can free it later.
          Is possible is to send via private message some json- or other files i.o. the relationships or fieldList of targetList. May be there are other disrupters.
          I've going on to work on not yet added or solved functionalities. Time is running.
          Thanks for your assistance and time.

          Christoph

          Comment


          • #6
            ctheuring,

            As I said earlier, analyzing JSON files will not help much in this situation. These files may point out the absence of some points, but will not indicate the search for a solution to this problem.

            For now, please try creating a new entity with the Person type, establishing a Many-to-Many relationship with the Target List entity, and test the functionality again.

            Comment


            • #7
              ok - I've now understand what you meen. I'll try to install a new entity person-type in the current installation ..

              Christoph

              Comment


              • #8
                Hello,

                with a new entity people the counter shows correct values.So: no problem generally in espo :-)
                I'm now looking for differences between entities personen and people.
                The entity people shows only 2 relations: n:n for taskList and parents : children for tasks
                Thje entity personen shows much more -> see attachment
                The entity taskList shows some relations, I didn't use - but I can't delete them (account, contacts) -> see attachment (n:1 is for assigned user)
                There is a difference for (not used) entity account to entity persons and people: the field Layout is empty (and can't choose one) ... but this can't be the problem, because persons didn't count and people count -> see attachments
                Has someone an idea?

                Christoph

                Comment


                • #9
                  Hello,

                  good news now it runs.
                  How I've fixed it:
                  - delete all links of Personen in taskList
                  - delete the sup-table Personen in taskList
                  - delete the relationship taskList n:n Personen
                  - rebuild the backend and clear cache
                  - re-add relationship taskList n:n Personen
                  - re-add sub-table Personen in taskList
                  - rebuild the backend and clear cache
                  all fine now.
                  Thanks all for help.

                  Christoph

                  Comment

                  Working...
                  X