<div dir="ltr"><div>Thanks Richard and Alan.<br><br>We think that is the way to add the relationship, gonna apply and tell the results.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/3/20 Alan Lord (News) <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 20/03/13 04:31, Juan Pablo Botero wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Richards, thanks for answer.; i think that is the way.<br>
But it seems to work with a new modules, the modules that already exist,<br>
what file can i edit?<br>
</blockquote>
<br></div>
You just need to create your vtlib script in the same way as you do for a new module.<br>
<br>
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):<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<?php<br>
// Turn on debugging level<br>
$Vtiger_Utils_Log = true;<br>
include_once('vtlib/Vtiger/<u></u>Menu.php');<br>
include_once('vtlib/Vtiger/<u></u>Module.php');<br>
include_once('F1k_Extensions/<u></u>libs.php');<br>
<br>
// Get a handle to the accounts module<br>
$module = Vtiger_Module::getInstance('<u></u>Accounts');<br>
<br>
// Get our custom block<br>
<br>
$block_custom = Vtiger_Block::getInstance('<u></u>Custom Information', $module);<br>
<br>
// Add the field to hold IP Addresses<br>
<br>
// Remove if already exiting<br>
$field_ipadds = Vtiger_Field::getInstance('<u></u>ipadds', $module);<br>
<br>
if ($field_ipadds != false) {<br>
<br>
        $field_ipadds->delete();<br>
<br>
}<br>
<br>
$field_ipadds = new Vtiger_Field();<br>
<br>
$field_ipadds->name = 'ipadds';<br>
<br>
$field_ipadds->label= 'IP Addresses';<br>
<br>
$field_ipadds->column = 'ipadds';<br>
<br>
$field_ipadds->columntype = 'TEXT';<br>
<br>
$field_ipadds->uitype = 21;<br>
<br>
$field_ipadds->typeofdata = 'V~O';<br>
<br>
$block_custom->addField($<u></u>field_ipadds);<br>
<br>
?><br>
</blockquote>
<br>
HTH<span><font color="#888888"><br>
<br>
Al<br>
<br>
-- <br>
Libertus Solutions<br>
<a href="http://www.libertus.co.uk" target="_blank">http://www.libertus.co.uk</a><br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Cordialmente:<br>Juan Pablo Botero<br>Administrador de Sistemas informáticos<br>Fedora Ambassador for Colombia<div><a href="http://www.jpilldev.net" target="_blank">http://www.jpilldev.net</a><br>


</div>
</div></div>