[Vtigercrm-developers] Add supplier to an event calendar

Estefan Civera estefan.civera at gmail.com
Tue Jan 12 11:46:16 GMT 2016


Hi
when I create a caledar event I would like associate it to an supplier, but
in the related field I only use ticket, opportunity, organinizations, lead
and campaing.

I've also use vtib to create a related field to a supplier but it goes into
todo layout!!!

$module=Vtiger_Module::getInstance('Calendar');
if($module == null)
	die("null");
// Aggiungo fornitori al caledario
$relto='Vendors';
$block = Vtiger_Block::getInstance('LBL_DESCRIPTION_INFORMATION', $module);
$field = new Vtiger_Field();
$field->name = 'vendor';
$field->column =  'vendor';
$field->label ='Fornitore';
$field->table = 'vtiger_activity';//$this->getTableName($module);
$field->columntype = 'int(19)';
$field->uitype = 10;
$field->typeofdata = 'I~O';      
$block->addField($field);        
is_array($relto) ? $field->setRelatedModules($relto) :
$field->setRelatedModules(array($relto));

can someone help me?




-----
Ing. Estefan Civera
Vtiger developer and consultant
http://www.estefancivera.net
Italy
--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Add-supplier-to-an-event-calendar-tp18139.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.


More information about the vtigercrm-developers mailing list