[Vtigercrm-developers] Add supplier to an event calendar

Matteo Baranzoni info at greenbitweb.com
Tue Jan 12 12:22:03 GMT 2016


try
$module=Vtiger_Module::getInstance('Events');

2016-01-12 12:46 GMT+01:00 Estefan Civera <estefan.civera at gmail.com>:

> 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.
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20160112/875428cc/attachment.html>


More information about the vtigercrm-developers mailing list