[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtigercrm-developers
Subject:    Re: [Vtigercrm-developers] service contract to product
From:       Revathy Sankaranarayanan <revathy.sankaran () sybrant ! com>
Date:       2012-01-27 5:06:23
Message-ID: CAE-zz+VdGDZFkS=rJSBEAawOBzDD7Ob3-_neUfcKaf=R8+awtw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi  Nicolas,

Thanks. This is what I was expecting.

Regards
*Revathy*

On Wed, Jan 25, 2012 at 5:36 PM, Nicolas Larcipretti <
niclarcipretti@gmail.com> wrote:

> 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@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/
>>
>
>
> _______________________________________________
> http://www.vtiger.com/
>

[Attachment #5 (text/html)]

Hi   Nicolas,<br><br>Thanks. This is what I was \
expecting.<br><br>Regards<br><b>Revathy</b><br><br><div class="gmail_quote">On Wed, \
Jan 25, 2012 at 5:36 PM, Nicolas Larcipretti <span dir="ltr">&lt;<a \
href="mailto:niclarcipretti@gmail.com">niclarcipretti@gmail.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">Hi,<br><br>You can create a relation field on one of \
them with a vtlib script like this:<br><br>&lt;?php<br>require_once \
&#39;vtlib/Vtiger/Block.php&#39;;<br> <br>//Some block on the service contract \
module<br>$blockInstance = Vtiger_Block::getInstance(blockNumber);<br> \
<br>$fieldInstance = new Vtiger_Field();<br>$fieldInstance-&gt;name = \
&#39;rel_product&#39;;<br>$fieldInstance-&gt;label = \
&#39;Product&#39;;<br>$fieldInstance-&gt;table = \
&#39;vtiger_servicecontractscf&#39;;<br>$fieldInstance-&gt;column = \
&#39;rel_product&#39;;<br>

$fieldInstance-&gt;columntype = &#39;VARCHAR(255)&#39;;<br>$fieldInstance-&gt;uitype \
= 10;<br>$fieldInstance-&gt;typeofdata = \
&#39;V~O&#39;;<br><br>$blockInstance-&gt;addField($fieldInstance);<br><br>$fieldInstance-&gt;setRelatedModules(Array(&#39;Products&#39;));<br>


<br>?&gt;<br><br>Maybe that will do the trick for \
you.<br><br>Cheers<br><br>Nicolas<br><br><div class="gmail_quote">2012/1/25 Revathy \
Sankaranarayanan <span dir="ltr">&lt;<a href="mailto:revathy.sankaran@sybrant.com" \
target="_blank">revathy.sankaran@sybrant.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div><div class="h5">Hi,<br><br>I would like to know how we \
can associate a service contract with a product. <br><br>Urgent Help is \
appreciated.<br clear="all">

<br><p><a name="13514c753df5e7d1_13512b793418aa20_SafeHtmlFilter_12d7e190c10f16b7_SafeHtmlFilter_SafeHtmlFilter__MailAutoSig"><span \
style="font-size:10pt;color:rgb(36,64,97)">Regards<font color="#000000"><br>


</font></span></a><b><span style="font-size:12pt;font-family:&quot;Times New \
Roman&quot;,&quot;serif&quot;;color:rgb(36,64,97)">Revathy S</span></b><span \
style="font-family:Arial,sans-serif;color:rgb(36,64,97)"></span><br>



</p><br>
<br></div></div>_______________________________________________<br>
<a href="http://www.vtiger.com/" \
target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br> \
<br>_______________________________________________<br> <a \
href="http://www.vtiger.com/" \
target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br><br \
clear="all"><br><br>



_______________________________________________
http://www.vtiger.com/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic