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 蓝桥oj3931,请问我错在哪里
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染