[Vtigercrm-developers] change bloc to field using vtlibs

Matteo Baranzoni barra at greenbitweb.com
Wed Oct 24 07:30:16 PDT 2012


what I need is to move field:

phone
otherphone
email1
email2
fax

ecc
from block "LBL_ACCOUNT_INFORMATION"
to other blok using vtlibs!




2012/10/24 Adam Heinz <amh at metricwise.net>

> I don't quite understand your english, but here goes:
>
> Doesn't the Accounts module already provide for both account
> information and related contact information?  If that is insufficient,
> maybe this example code can push you in the right direction.
>
> require_once('vtlib/Vtiger/Module.php');
> require_once('vtlib/Vtiger/Block.php');
> require_once('vtlib/Vtiger/Field.php');
>
> $module = Vtiger_Module::getInstance('Accounts');
>
> $block = new Vtiger_Block();
> $block->label = 'LBL_CONTACT_INFORMATION'; // Add label translations
> $block->save($module);
>
> $field = new Vtiger_Field();
> $field->label = 'foo';
> $field->name = 'foo';
> $field->table = 'vtiger_accountscf';
> $field->column = 'foo';
> $field->columntype = 'INTEGER(1)';
> $field->uitype = 56; // Checkbox
> $field->typeofdata = 'C~O';
> $block->addField($field);
>
> 2012/10/24 Matteo Baranzoni <barra at greenbitweb.com>:
> > Hy,
> > in Account modules i create da "contact information" block with email,
> > phone, mobile ecc.
> >
> > Usually i move existing modules working directly on DB.
> > it is possible do this via the vtlibs?
> >
> > --
> > Matteo Baranzoni - Greenbit WEB
> _______________________________________________
> http://www.vtiger.com/
>



-- 
Matteo Baranzoni - Greenbit WEB

*:: Avvertenze Legali ::*
Questa email, e ogni eventuale allegato, è a uso esclusivo della Persona o
della Società/Ente a cui è indirizzato e potrebbe contenere informazioni
riservate. Se avete ricevuto questa email per errore, ci scusiamo per
l'accaduto e Vi preghiamo cortesemente di darcene sollecita comunicazione e
a cancellare l'email e ogni eventuale allegato. Vi ricordiamo che
l'utilizzo, la conservazione, la distribuzione e/o la diffusione dei dati
ricevuti per errore costituiscono violazioni alle disposizioni del D.Lgs.
196/03 (Codice della Privacy).
This e-mail, and any attachment, is for the intended recipient only and is
confidential. If this e-mail has been misdirected, please let the sender
know and delete it with any attachment, thanks. Any disclosure, copying,
distribution is prohibited
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20121024/54125214/attachment.html 


More information about the vtigercrm-developers mailing list