【问题标题】:Vtiger Activity module to be added to custom Module要添加到自定义模块的 Vtiger 活动模块
【发布时间】:2017-04-07 09:56:09
【问题描述】:

http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/entity-module.html

使用上面链接中给出的文档,我创建了一个名为 Leaves 的自定义模块。现在,下一个任务是将活动模块添加到 Leaves 模块。我用下面的代码做同样的事情。

include_once('vtlib/Vtiger/Module.php');
$moduleInstance = Vtiger_Module::getInstance('Leaves');
$accountsModule = Vtiger_Module::getInstance('Calendar');
$relationLabel  = 'Activities';
$moduleInstance->setRelatedList(
      $accountsModule, $relationLabel, Array('ADD','SELECT'), 'get_activities'
);

现在,在 module/Leaves/Leaves.php 中,我从 Accounts 模块的 Accounts.php 模块中复制了 get_activities 函数。它现在应该可以工作,但它没有。

我添加了一个假期并打开了它的详细视图。看到那里的活动标签,我很高兴。我单击它并为特定的单次休假添加了 2 个事件。理想情况下,必须在此处列出所有事件,即我最近添加的 2 个事件,但没有事件。

我检查了代码,发现一个关系存储在“vtiger_seactivityrel”表中,带有activityid 和single leave id(crmid)。但是当我从 Leaves 模块添加事件时。活动已创建,但关系未存储在“vtiger_seactivityrel”中。我通过添加 activityid 和 crmid 手动建立关系,然后它开始显示事件。

因此,这里提出的问题是为什么没有填充“vtiger_seactivityrel”表。

如果你有解决方案,请有人帮助我。I have attached Image of one such leave which is showing blank even after adding event.

【问题讨论】:

  • 查看活动状态。如果它已完成,则延迟它不会显示在相关列表下。如果状态不同,请分享您的日志,以便我检查并为您提供解决方案。
  • 我找到了解决方案的人,我也发布了答案。

标签: php crm vtiger vtigercrm


【解决方案1】:

经过大量研究后,我发现我需要更新 vtiger_ws_referencetype 表以建立关系。这是相同的查询。在我的情况下,custommodulename 将被 Leaves 替换。

insert into vtiger_ws_referencetype(fieldtypeid,type) values (34,'custommodulename');

【讨论】:

    猜你喜欢
    • 2017-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-27
    • 2013-08-02
    • 2022-01-18
    • 1970-01-01
    相关资源
    最近更新 更多