[Vtigercrm-developers] service contract to product
Nicolas Larcipretti
niclarcipretti at gmail.com
Wed Jan 25 04:06:02 PST 2012
Hi,
You can create a relation field on one of them with a vtlib script like
this:
<?php
require_once 'vtlib/Vtiger/Block.php';
//Some block on the service contract module
$blockInstance = Vtiger_Block::getInstance(blockNumber);
$fieldInstance = new Vtiger_Field();
$fieldInstance->name = 'rel_product';
$fieldInstance->label = 'Product';
$fieldInstance->table = 'vtiger_servicecontractscf';
$fieldInstance->column = 'rel_product';
$fieldInstance->columntype = 'VARCHAR(255)';
$fieldInstance->uitype = 10;
$fieldInstance->typeofdata = 'V~O';
$blockInstance->addField($fieldInstance);
$fieldInstance->setRelatedModules(Array('Products'));
?>
Maybe that will do the trick for you.
Cheers
Nicolas
2012/1/25 Revathy Sankaranarayanan <revathy.sankaran at sybrant.com>
> Hi,
>
> I would like to know how we can associate a service contract with a
> product.
>
> Urgent Help is appreciated.
>
> Regards
> *Revathy S*
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20120125/3e5b8235/attachment-0002.html
More information about the vtigercrm-developers
mailing list