[Vtigercrm-developers] Relationship between Projects and Accounts

Juan Pablo Botero juanpabloboterolopez at gmail.com
Fri Mar 22 13:58:32 UTC 2013


That works pretty cool.

Thanks for your help


2013/3/21 Juan Pablo Botero <juanpabloboterolopez at gmail.com>

> Thanks Richard and Alan.
>
> We think that is the way to add the relationship, gonna apply and tell the
> results.
>
>
> 2013/3/20 Alan Lord (News) <alanslists at gmail.com>
>
> On 20/03/13 04:31, Juan Pablo Botero wrote:
>>
>>> Richards, thanks for answer.; i think that is the way.
>>> But it seems to work with a new modules, the modules that already exist,
>>> what file can i edit?
>>>
>>
>> You just need to create your vtlib script in the same way as you do for a
>> new module.
>>
>> As an example here would be a vtlib script to add a new field to the
>> Accounts module (the nice thing doing it this way is it means no cf_xxx
>> fields and tables - and you can do anything the vtlib API supports):
>>
>>
>>  <?php
>>> // Turn on debugging level
>>> $Vtiger_Utils_Log = true;
>>> include_once('vtlib/Vtiger/**Menu.php');
>>> include_once('vtlib/Vtiger/**Module.php');
>>> include_once('F1k_Extensions/**libs.php');
>>>
>>> // Get a handle to the accounts module
>>> $module = Vtiger_Module::getInstance('**Accounts');
>>>
>>> // Get our custom block
>>>
>>> $block_custom = Vtiger_Block::getInstance('**Custom Information',
>>> $module);
>>>
>>> // Add the field to hold IP Addresses
>>>
>>> // Remove if already exiting
>>> $field_ipadds = Vtiger_Field::getInstance('**ipadds', $module);
>>>
>>> if ($field_ipadds != false) {
>>>
>>>         $field_ipadds->delete();
>>>
>>> }
>>>
>>> $field_ipadds = new Vtiger_Field();
>>>
>>> $field_ipadds->name = 'ipadds';
>>>
>>> $field_ipadds->label= 'IP Addresses';
>>>
>>> $field_ipadds->column = 'ipadds';
>>>
>>> $field_ipadds->columntype = 'TEXT';
>>>
>>> $field_ipadds->uitype = 21;
>>>
>>> $field_ipadds->typeofdata = 'V~O';
>>>
>>> $block_custom->addField($**field_ipadds);
>>>
>>> ?>
>>>
>>
>> HTH
>>
>> Al
>>
>> --
>> Libertus Solutions
>> http://www.libertus.co.uk
>>
>> ______________________________**_________________
>> http://www.vtiger.com/
>>
>
>
>
> --
> Cordialmente:
> Juan Pablo Botero
> Administrador de Sistemas informáticos
> Fedora Ambassador for Colombia
> http://www.jpilldev.net
>



-- 
Cordialmente:
Juan Pablo Botero
Administrador de Sistemas informáticos
Fedora Ambassador for Colombia
http://www.jpilldev.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20130322/2d307ac5/attachment.html>


More information about the vtigercrm-developers mailing list