Jump to content


Show related account, contact or lead in Task portlet

task portlet related contacts leads

  • Please log in to reply
No replies to this topic

#1 BadSantos



  • Members
  • Pip
  • 1 posts

Posted 08 July 2014 - 05:45 AM

Hi, I want to see related related account, contact or lead in Task portlet.


I added my own field in TasksMyListView metadata :

array('cells' =>
                                            'elements' => array(
                                                array('attributeName' => 'null', 'type' => 'RelatedItem'),

Then I created \app\protected\modules\tasks\elements\derived\RelatedItemElement.php for CgridView header.


And also I created \app\protected\modules\tasks\adapters\columns\RelatedItemListViewColumnAdapter.php

class RelatedItemListViewColumnAdapter extends ListViewColumnAdapter
         * @return array
        public function renderGridViewData()
            return array(
                'name'   => 'moduleClassName',
                'header' => 'Related Object',
                'type'   => 'raw',
                'value'  => 'print_r($data->activityItems,1)' // HOW TO GET NAME AND LINK TO RELATED OBJECT?!

You can see that I don't know how to show name of the relation object and link...


$data->activityItems - returns MANY_TO_MANY....

Also tagged with one or more of these keywords: task portlet, related, contacts, leads

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users