vtiger Forum Index vtiger
The Honest Open Source CRM
 

Pick List 4.2.x
Click here to go to the original topic

 
       vtiger Forum Index -> Code Contributions - 4.x
Previous topic :: Next topic  
Author Message
ales



Joined: 13 Jun 2006
Posts: 18
Location: Slovenia

Posted: Wed Aug 02, 2006 10:34 am    Post subject: Pick List 4.2.x  

How to change type of field in module Potentials from Text to ComboBox (read PickList). We will create new PickList called NextStep

Here is copy/paste from my code:

1. In file ../modules/Users/Security.php change commented line with non comented (change type of field from 1 - text to 15 - combobox):
..
//old
// $this->db->query("insert into field values (2,".$this->db->getUniqueID("field").",'nextstep','potential',1,'1','nextstep','Next Step',1,0,0,100,7,1,1,'V~O')");

//new
$this->db->query("insert into field values (2,".$this->db->getUniqueID("field").",'nextstep','potential',1,'15','nextstep','Next Step',1,0,0,100,7,1,1,'V~O')");
..

2. Had to update table FIELD for row:
..
//old
2, 99, 'nextstep', 'potential', 1, '1', 'nextstep', 'Next Step', 1, 0, 0, 100, 7, 1, 1, 'V~O'

//new
2, 99, 'nextstep', 'potential', 1, '15', 'nextstep', 'Next Step', 1, 0, 0, 100, 7, 1, 1, 'V~O'
..

3. Create table for PickList NextStep:
..
CREATE TABLE `nextstep` (
`nextstepid` INT(19) UNSIGNED NOT NULL AUTO_INCREMENT,
`nextstep` VARCHAR(200) NOT NULL DEFAULT '',
`sortorderid` INT(19) UNSIGNED NOT NULL DEFAULT 0,
`presence` INT(1) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(`nextstepid`)
)
ENGINE = InnoDB;
..

4. In file ../modules/Settings/ComboFieldList.php replace all under elseif for Potentials:
..
elseif($fld_module == 'Potentials')
{
$custFldArray = Array($mod_strings['LBL_LEAD_SOURCE']=>'leadsource'
,$mod_strings['LBL_NEXT_STEP']=>'nextstep'
,$mod_strings['LBL_BUSINESS_TYPE']=>'opportunity_type'
,$mod_strings['LBL_CURRENCY_TYPE']=>'currency'
,$mod_strings['LBL_SALES_STAGE']=>'sales_stage');
$standCustFld = getStdOutput($custFldArray, $mod_strings);
}
..

5. In file ../modules/Settings/language/en_us.lang.php add new line:
..
'LBL_NEXT_STEP'=>'Next step',
..


THAT'S IT

There will be patch available soon..

By Ales
Back to top  
 
       vtiger Forum Index -> Code Contributions - 4.x
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group