Get content of custom dropdown lists

Hi all

Our customers interface with data stored in SugarCRM  through a wordpress website via the Sugar API. In sugar we have a dropdown list  in the cases module (customersstatedissue_c) which contains the types of faults we want our customers to select. In wordpress i want to give this dropdown list with the same values to the user. It was done previously by editing the wordpress template file to match our old CRM.

I wandered if with sugar i could just pull those values through a custom api endpoint so wordpress is always matching sugar.

I looked at https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.9/Architecture/Languages/Managing_Lists/#Managing_Lists_With_Dropdown_Helper and the DropDownHelper class and started to work on my api but the helper class dosnt seem to have a function to output the lists values

    public function registerApiRest() {
      return array(
        'dropdownListAddKey' => array(
          'reqType' => 'get',
          'path' => array('getDropDownValues'),
          'pathVars' => array('',''),
          'method' => 'getDropDownValues',
          // 'shortHelp' => 'create a new item to an specific list',
          // 'longHelp' => 'custom/clients/base/api/help/MyEndPoint_MyGetEndPoint_help.html',
        ),
      );
    }   

public function getDropDownValues($api, $args) {
      require_once('modules/Studio/DropDowns/DropDownHelper.php');
      $dropdownHelper = new DropDownHelper();

      $parameters = array();
      $parameters['dropdown_name'] = $args['list_name'];
     
    }

Has anyone been able to achieve this ?

Parents Reply Children
No Data