[Vtigercrm-developers] Set Related Module not working for Custom Module in vtiger 5.1

Ramya Banglore ramya.banglore at gmail.com
Tue Dec 4 23:45:28 PST 2012


Hi All,

I want to associate custom module to another Custom Module , its not
working fine for me

Actually Standard Module assoicated to Custom Module Working Fine , but the
same process not working to associate between custom Modules

I used  the setRelatedModule() function to associate the *Contacts* Module
to Custom Module*(Payslip)*

the same thing not working for Custom Module

I was facing this problem since two days, please help out of this problem
<?php
    ini_set('display_errors',On);
    ini_set('error_reporting',E_ALL & ~E_NOTICE & E_DEPRECATED);
    include_once('vtlib/Vtiger/Module.php');


    $Vtiger_Utils_Log = true;
    include_once('vtlib/Vtiger/Utils.php');
    include_once('vtlib/Vtiger/Menu.php');
    include_once('vtlib/Vtiger/Module.php');

    $moduleInstance=Vtiger_Module::getInstance('Telemarketer');
    $moduleInstance->initWebservice();

    $blockInstance = new Vtiger_Block();
    $blockInstance->label = 'LBL_TELEMARKETER_INFORMATION';
    $moduleInstance->addBlock($blockInstance);

    $fieldInstance = new Vtiger_Field();
    $fieldInstance->name = 'LinkToSalesMen';
    $fieldInstance->table = 'vtiger_telemarketer';
    $fieldInstance->label='Link To SalesMen';
    $fieldInstance->column = 'linktosalesmen';
    $fieldInstance->columntype = 'int(19)';
    $fieldInstance->uitype = 10;
    $fieldInstance->typeofdata = 'V~M';

    $blockInstance->addField($fieldInstance);

    $fieldInstance->setRelatedModules(Array('SalesMen'));

    ?>
This is the Script i used

after open the popup i got the below warning

*Warning: Invalid argument supplied for foreach() in
C:\wamp\www\vtigercrm510\include\utils\ListViewUtils.php on line 1400*

Please anybody suggest to overcome this problem

Please.............................................

Thanks & Regards,
B.Ramya.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20121204/40cc4adf/attachment-0001.html 


More information about the vtigercrm-developers mailing list