AnsweredAssumed Answered

Fill Dropdown from a database 6.5.24

Question asked by Lance Devin on Oct 7, 2016
Latest reply on Oct 10, 2016 by Lance Devin

Sugar Version: 6.5.24

Database: MS SQL Server

deployment: Onsite

IIS 7.x

PHP: 5.4.24


I have created a vardef override in
..\custom\Extension\modules\<MODULE>\Ext\Vardefs\sugarfield_custom_receptacles.php and it has these two lines that override the field receptacle_type_4 which is a dropdown field.

      $dictionary['ccfg_Cabconfig']['fields']['receptacle_type_4']['function'] = 'getReceptacleTypes';


I created the global function getReceptacleTypes in



custom_utils for simplicity is stubbed to be


function getReceptacleTypes() {

   static $list = null;

   <bunch of commented out code to get stuff from db>

   return $list;



This basically gives me a 500 error in IIS.  Obviously, I'm either approaching this wrong (but I've referred to these two articles) 


or Sugar 6.5.24 doesn't support this.


Either way, if anybody could help I would be highly appreciative and will drink a beer in your honor.  Thank you in advance.