doujiao0110 2013-11-18 09:38
浏览 45
已采纳

vTiger - 无法从“更多信息”选项卡下的“潜在顾客模块”中选择“自定义模块”记录

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.

  • 写回答

1条回答 默认 最新

  • dopgv00024 2013-11-18 11:45
    关注

    You have to Create a function as a told in Comment and your code is wrong for set relation between to module. You have to use this code.

     $module = Vtiger_Module::getInstance('Store');
     $storemodule1 = Vtiger_Module::getInstance('Calendar');
     $relationLabel = 'Activities';
     $function_name = 'get_activities';
     $module->setRelatedList( $storemodule1, $relationLabel, Array('ADD','SELECT'), $function_name );
    

    The function which you will create replace it with 'get_activities' and i think you know which other value have to change.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作