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

ardi zeneli zeneliiardi at gmail.com
Tue Jul 21 13:39:55 GMT 2015


Hi Matteo,

i executed the query you send me and "other_acc3" was added as a column in
the vtiger_activity table. But when i tried to execute the other query it
gave me the same error as before:  #1054 - Unknown column 'other_acc3' in
'where clause'.
Anything else i might do to make this work?

Thanks

On Tue, Jul 21, 2015 at 3:03 PM, Matteo Baranzoni <info at greenbitweb.com>
wrote:

> you need to update vtiger_activity table: ALTER TABLE `vtiger_activity`
> ADD `other_acc3` VARCHAR(255) NOT NULL;
>
>
> 2015-07-21 14:51 GMT+02:00 ardi zeneli <zeneliiardi at gmail.com>:
>
>> Hi Matteo,
>>
>> i tried executing the script and it worked, the uitype 10 field was
>> created in the Events but i still wasn't able to save records because the
>> following error appeared: {"success":false,"error":{"code":"Record you are
>> trying to access is not found","message":"Record you are trying to access
>> is not found"}}
>> I then tried to execute the query you sent me but an error appeared as
>> well: #1054 - Unknown column 'other_acc3' in 'where clause', even after i
>> manually added this field to the vtiger_field table.
>>
>> Is there anything else i am missing?
>>
>> Thanks
>>
>> On Tue, Jul 21, 2015 at 1:30 PM, Matteo Baranzoni <info at greenbitweb.com>
>> wrote:
>>
>>> 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/
>>>>
>>>
>>>
>>> _______________________________________________
>>> http://www.vtiger.com/
>>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20150721/7ace6f9d/attachment-0001.html>


More information about the vtigercrm-developers mailing list