<br><div class="gmail_quote">Hi All, <br><br>I want to associate custom module to another Custom Module , its not working fine for me<br><br>Actually Standard Module assoicated to Custom Module Working Fine , but the same process not working to associate between custom Modules<br>

<br>I used  the setRelatedModule() function to associate the <b>Contacts</b> Module to Custom Module<b>(Payslip)</b><br><br>the same thing not working for Custom Module<br><br>I was facing this problem since two days, please help out of this problem<br>
&lt;?php<br>    ini_set(&#39;display_errors&#39;,On);<br>
    ini_set(&#39;error_reporting&#39;,E_ALL &amp; ~E_NOTICE &amp; E_DEPRECATED);<br>    include_once(&#39;vtlib/Vtiger/Module.php&#39;);<br><br><br>    $Vtiger_Utils_Log = true;<br>    include_once(&#39;vtlib/Vtiger/Utils.php&#39;);<br>

    include_once(&#39;vtlib/Vtiger/Menu.php&#39;);<br>    include_once(&#39;vtlib/Vtiger/Module.php&#39;);<br><br>    $moduleInstance=Vtiger_Module::getInstance(&#39;Telemarketer&#39;);<br>    $moduleInstance-&gt;initWebservice();<br>

<br>    $blockInstance = new Vtiger_Block();<br>    $blockInstance-&gt;label = &#39;LBL_TELEMARKETER_INFORMATION&#39;;<br>    $moduleInstance-&gt;addBlock($blockInstance);<br><br>    $fieldInstance = new Vtiger_Field();<br>

    $fieldInstance-&gt;name = &#39;LinkToSalesMen&#39;;<br>    $fieldInstance-&gt;table = &#39;vtiger_telemarketer&#39;;<br>    $fieldInstance-&gt;label=&#39;Link To SalesMen&#39;;<br>    $fieldInstance-&gt;column = &#39;linktosalesmen&#39;;<br>

    $fieldInstance-&gt;columntype = &#39;int(19)&#39;;<br>    $fieldInstance-&gt;uitype = 10;<br>    $fieldInstance-&gt;typeofdata = &#39;V~M&#39;;<br><br>    $blockInstance-&gt;addField($fieldInstance);<br><br>    $fieldInstance-&gt;setRelatedModules(Array(&#39;SalesMen&#39;));<br>

<br>    ?&gt;<br>This is the Script i used <br><br>after open the popup i got the below warning<br><br><font><u><b>Warning: Invalid argument supplied for foreach() in C:\wamp\www\vtigercrm510\include\utils\ListViewUtils.php on line <i>1400</i></b></u></font><br>

<br>Please anybody suggest to overcome this problem<br><br>Please.............................................<br><br>Thanks &amp; Regards,<br>B.Ramya.<br><br><br><br>
</div><br>