[Vtigercrm-developers] UIType 16 Picklists (again)...

Adam Heinz amh at metricwise.net
Tue May 14 17:29:04 UTC 2013


Here's what my getPickListValues() looks like.  YMMV, SHOW COLUMNS may be
MySQL-specific DDL.

function getPickListValues($tablename, $roleid) {
global $adb;
* if ($adb->database->GetOne("SHOW COLUMNS FROM vtiger_$tablename LIKE
'sortorderid'")) {*
* $query = "select $tablename from vtiger_$tablename order by sortorderid";*
* $result = $adb->pquery($query, array());*
* } else {*
$query = "select $tablename from vtiger_$tablename inner join
vtiger_role2picklist on vtiger_role2picklist.picklistvalueid =
vtiger_$tablename.picklist_valueid where roleid=? and picklistid in (select
picklistid from vtiger_picklist) order by sortid";
 $result = $adb->pquery($query, array($roleid));
* }*
$fldVal = Array();
 while ($row = $adb->fetch_array($result)) {
$fldVal [] = $row[$tablename];
}
 return $fldVal;
}



On Tue, May 14, 2013 at 12:29 PM, Alan Lord <alanslists at gmail.com> wrote:

> On 14/05/13 16:58, Alan Lord wrote:
>
>>
>> I can't open the Workflow editor for a vtlib module where we have
>> converted a picklist from UItype 15 to 16 because of a missing column in
>> the vtiger_cf_xxx table...
>>
>>
> A bit more digging.
>
> The problem stems from the getPicklistOptions() function in
> include/Webservices/**WebserviceField.php.
>
> This does not expect UIType 16 picklists.
>
> It calls getPickListValues() in CommonUtils.php.
>
> I am tempted to extend the getPicklistOptions() function to handle UIType
> 16 in a different way.
>
> Sound about right?
>
> Al
>
>
> ______________________________**_________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130514/1ea02bd5/attachment.html>


More information about the vtigercrm-developers mailing list