[Vtigercrm-developers] Creating custom uitype 10 field in the Calendar Module.

Matteo Baranzoni info at greenbitweb.com
Tue Jul 21 11:30:05 GMT 2015


this vtlibs script:

// Turn on debugging level
> $Vtiger_Utils_Log = true;
> require_once('vtlib/Vtiger/Module.php');
> require_once('vtlib/Vtiger/Block.php');
> require_once('vtlib/Vtiger/Field.php');
> $module = Vtiger_Module::getInstance('Events');
> $block = Vtiger_Block::getInstance('LBL_RELATED_TO',$module);
> $field = new Vtiger_Field();
> $field->label = 'other accounts';
> $field->name = 'other_acc3';
> $field->column = 'other_acc3';
> $field->columntype = 'VARCHAR(255)';
> $field->uitype = 10;
> $field->typeofdata = 'V~O';
> $block->addField($field);
> $block->save($module);
> $field->setRelatedModules(Array('Accounts'));


save on vtiger field bad tablename ( '0' value).
you can fix with something like:

UPDATE `vtiger_field` SET `tablename` = 'vtiger_activity' WHERE
`vtiger_field`.`columnname` = other_acc3;
ALTER TABLE `vtiger_activity` ADD `other_acc3` VARCHAR(255) NOT NULL;


2015-07-21 12:20 GMT+02:00 Simone Travaglini <simonetravaglini at gmail.com>:

> or also to campaign and lead! suppose you are doing a campaign and want
> track event and opportunity generated with relation to lead!
>
> 2015-07-21 9:55 GMT+02:00 Vincent Piton <vincent.piton at free.fr>:
>
>> +1
>>
>> It would be great to relate an event to a campaign and an account
>>
>>
>>
>> *De :* vtigercrm-developers-bounces at lists.vtigercrm.com [mailto:
>> vtigercrm-developers-bounces at lists.vtigercrm.com] *De la part de* Simone
>> Travaglini
>> *Envoyé :* mardi 21 juillet 2015 09:50
>> *À :* vtigercrm-developers at lists.vtigercrm.com
>> *Objet :* Re: [Vtigercrm-developers] Creating custom uitype 10 field in
>> the Calendar Module.
>>
>>
>>
>> Could be usefull, sometimes we need to do the same. +1
>>
>>
>>
>> 2015-07-20 12:53 GMT+02:00 ardi zeneli <zeneliiardi at gmail.com>:
>>
>> Hi Manu,
>>
>>
>>
>> I wanted this new custom uitype 10 field related to Organisations for the
>> cases where the field in the "Related To" block is alredy related with
>> another Opportunity or Campaign and i want to relate this Event with an
>> Organization, which would not be possible since the field is alredy
>> compiled.
>>
>>
>>
>> Thanks
>>
>>
>>
>> On Mon, Jul 20, 2015 at 12:35 PM, Manu urs <manu.k at vtiger.com> wrote:
>>
>> Hi
>>
>> You can relate a "Event" with  "Organizations" through the "Related  to"
>> block  in  Event creation . Let us know your purpose of creating a new
>> custom uitype 10 field ?
>>
>> Regrards,
>>
>> Manu Urs
>>
>>
>>
>> On Mon, Jul 20, 2015 at 2:40 PM, ardi zeneli <zeneliiardi at gmail.com>
>> wrote:
>>
>> Hello,
>>
>>
>>
>> can anybody give me a hint on how to add a uitype 10 field on the
>> Calendar module, especially in the Events. Everytime i try to add it by
>> code to the root or by other extensions the uitype 10 field is added to the
>> "To Do-s". I would like for this custom field to be related with the
>> organizations module.
>>
>>
>>
>> Thanks
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>>
>>
>> --
>>
>> Regards,
>>
>> Manu
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>>
>>
>>
>> --
>>
>> Simone Travaglini
>> 328 5499846
>> Linkedin: Simone Travaglini
>>
>>
>> Rispetta l'ambiente: non stampare questa mail se non ti è veramente
>> necessario!
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
>
> --
> Simone Travaglini
> 328 5499846
> Linkedin: Simone Travaglini
>
>
> Rispetta l'ambiente: non stampare questa mail se non ti è veramente
> necessario!
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150721/6d095c1c/attachment-0001.html>


More information about the vtigercrm-developers mailing list