salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.5k stars 2.09k forks source link

Multiselect dropdown values are not appearing in Reports #1645

Open psatasiya opened 8 years ago

psatasiya commented 8 years ago

Hi,

I have created one custom multiselect dropdown field in lead module which is getting value from function. I'm using suiteCRM 7.6.4.

My custom field code is:

custom/include/custom_utils.php

`function getCompetitorsList() { $query = "SELECT id , name FROM accounts where account_type = 'Competitor' AND deleted=0"; $result = $GLOBALS['db']->query($query, false);

$list = array(); $list['']=''; while (($row = $GLOBALS['db']->fetchByAssoc($result)) != null) { $list[$row['name']] = $row['name']; }

return $list; }`

custom/Extension/modules/Leads/Ext/Vardefs/customField.php

$dictionary["Lead"]["fields"]["competitor_users"] = array( 'name' => 'competitor_users', 'type' => 'multienum', 'size' => '20', 'function' => 'getCompetitorsList', 'vname' => 'LBL_COMPETITOR_USERS', );

This field is working well in editview and detail view and also stores value in database but when I am trying to use this field in Reports then it is not showing any value. Neither in reports condition nor in report detail view. I've attached screen shots below for better understanding.

Thanks. lead edit lead detail report detail team 2016-06-24 14-28-16

shogunpol commented 8 years ago

This is related to #1816