如何在suiteCRM模块子面板列表中添加自定义操作按钮?

时间:2019-08-27 10:20:23

标签: sugarcrm suitecrm

我在套件CRM模块集成中需要一些建议。 我的一个模块中有一个子面板,需要再添加一个编辑按钮才能重定向到自定义表单,以分别从用户那里获取每一行的一些输入。

下面是我的子面板列表视图的示例图像。

In this image on click of the edit button of a row there is a remove button, I want to add one more custom button after remove and need to redirect from there to my new form

在上面的图像中,单击一行编辑按钮后,有一个删除按钮,我想在删除后再添加一个自定义按钮,并且需要从那里重定向到我的新表单。

我检查了一些论坛和博客,但没有找到解决方案。

1 个答案:

答案 0 :(得分:1)

要添加按钮,您将需要修改该子面板的元数据。在元数据中,您将看到EditRemove按钮的以下代码:

 'edit_button' => 
  array (
    'vname' => 'LBL_EDIT_BUTTON',
    'widget_class' => 'SubPanelEditButton',
    'module' => 'Contacts',
    'width' => '5%',
    'default' => true,
  ),
  'remove_button' => 
  array (
    'vname' => 'LBL_REMOVE',
    'widget_class' => 'SubPanelRemoveButton',
    'module' => 'Contacts',
    'width' => '5%',
    'default' => true,
  ),

您可以使用相同的数组语法添加新按钮。如您所见,每个按钮都使用特定的窗口小部件类(定义为widget_class),因此您需要为此添加新的widget_class类。您可以在以下文件夹中找到现有的窗口小部件类:include/generic/SugarWidgets

干杯!