Show team in entity layout

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fernando
    Junior Member
    • Oct 2016
    • 20

    Show team in entity layout

    Most entitys have a relation with teams, but in the layout of the entitys the team field is not there.
    Is there any config to change that?

    Thanks in advance
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hi
    You have to override record detail end edit view, search sideView and override it too

    Comment

    • Fernando
      Junior Member
      • Oct 2016
      • 20

      #3
      Hi,

      In the list.js of the entity i added
      ,
      {
      "name": "teams"
      }
      Now i have a teams colum but they are all "none".
      What do i have to change in record?

      Thanks in advance

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        if you need only to add teams to a list view, add it to entity list layout. You have to create custom entity service and override the method loadAdditionalFieldsForList
        Code:
        public function loadAdditionalFieldsForList(Entity $entity)
            {
                parent::loadAdditionalFieldsForList($entity);
                $entity->loadLinkMultipleField('teams');
            }
        Last edited by tanya; 11-03-2016, 02:45 PM.

        Comment

        • Fernando
          Junior Member
          • Oct 2016
          • 20

          #5
          Nice thanks

          Comment

          • devscrew
            Junior Member
            • Mar 2018
            • 16

            #6
            tanya the problem is how can I make them linkable in the listview? I could able to display team/users but they are just name, not a click able link.

            Comment

            • tanya
              Senior Member
              • Jun 2014
              • 4308

              #7
              By default these values are clickable. Just tested teams

              Comment

              • devscrew
                Junior Member
                • Mar 2018
                • 16

                #8
                tanya thanks for quick response, I just checked, indeed it works fine with teams, on both layout list and details, but its not working with followers field,
                Steps i executed are listed following:
                I added "$this->loadFollowers($entity);" in record.php in function "loadAdditionalFieldsForList"
                then added field name followers in list layout and detail layout..
                but no luck , isn't it same as teams? I did same step for teams and that started displaying.

                Comment

                • devscrew
                  Junior Member
                  • Mar 2018
                  • 16

                  #9
                  here is the screenshot, it may help you understanding my issue, in last column I want to display follower same as teams being displayed.
                  thanks

                  Comment

                  • tanya
                    Senior Member
                    • Jun 2014
                    • 4308

                    #10
                    change followers row in list layout to {"name":"followers", "view":"Fields.Followers"}
                    But this field makes this page slow

                    Comment

                    Working...