I have create a custom module Chat and when am trying to select Chat records from a Leads Module under the More Information tab.
It gives me error "Warning: Invalid argument supplied for foreach() in include\utils\ListViewUtils.php on line 1280"
and also its not listing any chats records but its working fine for other vtiger default module
Here is my code to set a Related List
$Vtiger_Utils_Log = true;
include_once('vtlib/Vtiger/Menu.php');
include_once('vtlib/Vtiger/Module.php');
$accounts=Vtiger_Module::getInstance('Leads');
$accounts->setRelatedList(Vtiger_Module::getInstance('Chat'), 'Chat',Array('ADD','SELECT'));
Please help for this. Thanks in advance.