Dashlet 'My Activities': Options: 'What to display' faulty?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agri
    Member
    • Mar 2021
    • 89

    Dashlet 'My Activities': Options: 'What to display' faulty?

    [EspoCRM 7.1.9, user language: German]

    Hi,

    I stumbled across a strange behaviour in Espo:

    There are three entities in question:
    - name: "Call", label: "Anruf"
    - name: "Meeting", label: "Termin"
    - name: "Task", label: "Aufgabe"

    myUser is user of "teamX". There are two roles: teamX-teamRole and teamX-userRole. Both roles apply to myUser.
    I DEaktivated entity "Call" in both roles.

    In dashlet "My Activities - Options, What to display", against expectations I see "Termine", "Call", "Aufgaben". Yes, ist "Call", not "Anrufe", as I would expect. And ist's "Call", not "Calls". But: why "Call" instead of "Anrufe" and why "Call" at all?

    On a test basis, I deactivated "Termin" (="Meeting") in both roles as well. In "What to display" I then see "Meeting" instead of "Termine", "Call" and "Aufgaben", whereas I expected "Aufgaben" only!

    The only solution I found - which is rather not acceptable, as it applies to all users -, was to copy application/Espo/Modules/Crm/Resources/metadata/dashlets/Activities.json into custom/Espo/Custom/Resources/metadata/dashlets/ and change "enabledScopeList" to ["Meeting", "Task"]. As this is part of the "defaults" section of Activities.json, I wonder why this is not overwritten by actual settings ...

    Kind regards
    Uli
  • yuri
    Member
    • Mar 2014
    • 8453

    #2
    Once you disallowed the Meeting entity type it hid all labels related to the Meeting scope for a user. But it didn't change their existing dashlet options of the dashlet, So there's the option Meeting, but the translation is not available for a user.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • agri
      Member
      • Mar 2021
      • 89

      #3
      Hi Yuri,
      I get it so far.
      In menues, entity types are shown or hidden as set in user roles. Is there any chance to disable an entity type in a dashlet for a user in a similar way?
      Users will be confused, if they e. g. cannot create calls because calls are disabled for the role/user, but are given the choice to show calls in the dashlet - which is meaningless, as there will be none ....
      Regards

      Comment

      • yuri
        Member
        • Mar 2014
        • 8453

        #4
        It's not that easy to do w/o a dirty hack unfortunately. As a workaround, you can setup a dashboard template (with only needed entity types in the activities dashlet) and apply it to a team or specific users. You can also define a default dashlet layout that will be applied to new users.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • agri
          Member
          • Mar 2021
          • 89

          #5
          Ok, I'll try that.

          Thanks a lot!
          Uli

          Comment

          • agri
            Member
            • Mar 2021
            • 89

            #6
            Hi Yuri,
            dashlet template does the trick for entity types in "My Activities - Options, What to display".

            A second challenge: the entity "leads" consists of many fields, several of which myUser is not meant to use - or even see. Concerning the forms, I can easily manage this in layout-sets.

            But: In dashlet "My Leads" -> Options - Layout, there's an empty inputfield, that on click offers a drop down to add more fields to the layout. This drop down list contains all the fields ever set up for lead. I then deactivated several fields in teamX-roles. Those fields will then not go away, but I just get the field names without translation - same behaviour as you mentioned above.

            So yes, dashboard templates are helpful, but don't do all I'd need ...

            Regards
            Uli

            Comment

            • yuri
              Member
              • Mar 2014
              • 8453

              #7
              I made a fix for the records dashlet. https://github.com/espocrm/espocrm/c...f8b39fad80a1e1
              If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

              Comment

              • agri
                Member
                • Mar 2021
                • 89

                #8
                Hi, this was quick!!!

                Unfortunately, my file client/src/views/dashlets/fields/records/expanded-layout.js looks very different from yours. Difference in version (mine is 7.1.9)?
                Attached Files

                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 8453

                  #9
                  Try to replace only getFieldDataList function.
                  If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                  Comment

                  • agri
                    Member
                    • Mar 2021
                    • 89

                    #10
                    Looks perfect!

                    Many thanks!

                    Regards
                    Uli

                    Comment

                    Working...