AnsweredAssumed Answered

Dynamic Dropdowns as SearchFields (Dashlets and Imports)

Question asked by gnimje gnimje on Jul 11, 2015
Hello everybody,

I am using SugarCRM CE 6.5.20.

In which I have created custom dynamic dropdown fields in Leads module, This works great in Detailview and Editview, but is not being used in the Dashlet and Import Wizard. Ideas? 
I am also sharing screenshots
Below my code....

I created a function in custom/Extention/application/Ext/Utils/ called Dropdowns.php containing the function (as described above):
function getSourceCodes()
        $query = “SELECT code, description FROM abd_dropdowns where dropdown =          ‘source_code’ and active = 1 order by description”;
$result = $GLOBALS[‘db’]->query($query, false);
$list = array();
while (($row = $GLOBALS[‘db’]->fetchByAssoc($result)) != null) {
$list[$row[‘code’]] = $row[‘description’];
return $list;
I created custom/Extention/modules/Leads/Ext/Vardefs/vardef.ext.php with the following line of code:
$dictionary[“Lead”][“fields”][“source_code_c”][“function”] = ‘getSourceCodes';

Please resolved this issue ASAP.

Govind Nimje
+65 90198149