Skip to content

Instantly share code, notes, and snippets.

@chicks
Last active December 17, 2015 04:18
Show Gist options
  • Save chicks/5549493 to your computer and use it in GitHub Desktop.
Save chicks/5549493 to your computer and use it in GitHub Desktop.
Programmatically Change Dropdowns in Sugar
// custom/include/language/en_us.lang.php
$GLOBALS['app_list_strings']['sales_stage_dom']=array (
'Prospecting' => 'Prospecting',
'Qualification' => 'Qualification',
'Needs Analysis' => 'Needs Analysis',
'Value Proposition' => 'Value Proposition',
'Id. Decision Makers' => 'Id. Decision Makers',
'Perception Analysis' => 'Perception Analysis',
'Proposal/Price Quote' => 'Proposal/Price Quote',
'Negotiation/Review' => 'Negotiation/Review',
'Closed Won' => 'Closed Won',
'Closed Lost' => 'Closed Lost',
'Interested' => 'Interested',
);
// modules/Opportunities/vardefs.php
$dictionary['Opportunity']['fields'] => array(
'sales_stage' => array (
'name' => 'sales_stage',
'vname' => 'LBL_SALES_STAGE',
'type' => 'enum',
'options' => 'sales_stage_dom',
'len' => '255',
'audited'=>true,
'comment' => 'Indication of progression towards closure',
'merge_filter' => 'enabled',
'importable' => 'required',
'required' => true,
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment