我在套件CRM模块集成中需要一些建议。 我的一个模块中有一个子面板,需要再添加一个编辑按钮才能重定向到自定义表单,以分别从用户那里获取每一行的一些输入。
下面是我的子面板列表视图的示例图像。
在上面的图像中,单击一行编辑按钮后,有一个删除按钮,我想在删除后再添加一个自定义按钮,并且需要从那里重定向到我的新表单。
我检查了一些论坛和博客,但没有找到解决方案。
答案 0 :(得分:1)
要添加按钮,您将需要修改该子面板的元数据。在元数据中,您将看到Edit
和Remove
按钮的以下代码:
'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
。
干杯!