doupeng5320 2016-11-14 23:39
浏览 63
已采纳

基于关系ID在SugarCRM中实现自定义过滤器

I've defined a many-to-many relationship between Accounts and a custom module (Tags). Tags has a subpanel in Accounts, however I need a custom filter on Accounts that will show all the Accounts records related to the Tag name you type in.

/custom/Extension/modules/Accounts/Ext/clients/base/basic/filterAccountsByTag.php

<?php
$viewdefs['Account']['base']['filter']['basic']['filters'][] = array(
    'id' => 'filterAccountsByTag',
    'name' => 'LBL_FILTER_ACCOUNTS_BY_TAG',
    'filter_definition' => array(
        array(
            'custom_tags_accountscustom_tags_ida'  => array(
                '$equals' => ' ',
            ),
        ),
        array(
            'name' => ''
        )
    ),
    'editable' => false,
    'is_template' => false
);

To sum it up, I want to display the results of the primary module based upon a filter from a sub-module. Anyone been through this? This is not a relate field, it's a relationship.

  • 写回答

1条回答 默认 最新

  • douzhicui2209 2016-12-09 09:04
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。
  • ¥20 CST怎么把天线放在座椅环境中并仿真
  • ¥15 任务A:大数据平台搭建(容器环境)怎么做呢?
  • ¥15 YOLOv8obb获取边框坐标时报错AttributeError: 'NoneType' object has no attribute 'xywhr'
  • ¥15 r语言神经网络自变量重要性分析