如何在 SugarCRM 表单中自动填充字段 [英] How to autopopulate a field in SugarCRM form

查看:24
本文介绍了如何在 SugarCRM 表单中自动填充字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们尚未定制 SugarCRM 6,但这是我们的第一个问题.

We have not yet customized SugarCRM 6 but here's our first issue.

当我们浏览联系人的记录时,在活动"子面板下,我们可以通过单击创建会议"来创建新会议.然后,会出现一个快速表单,并且帐户"字段 (parent_name) 会自动填充联系人的关联帐户名称.

When we are browsing a Contact's record, under the "Activities" subpanel, we can create a new meeting by clicking on "Create Meeting". Then, a quick form appears and the Account field (parent_name) is autopopulated with the Contact's associated Account name.

我的问题:如何修改它并使用联系人姓名自动填充 parent_name,以便会议将链接到联系人的记录而不是帐户的记录.

My question: how to modify that and autopopulate the parent_name with the Contact's name instead, so that the Meeting will be link to the Contact's record and not the Account's record.

谢谢!

亚历克斯

推荐答案

我相信你应该看看/modules/Meeting/MettingFormBase.php

Hi I believe you should be looking at /modules/Meeting/MettingFormBase.php

当然是将其复制到 custom/modules/Meeting/.

Copy this to custom/modules/Meeting/ of course.

看看第 73 行;$default_parent_type= $app_list_strings['record_type_default_key'];和第 83 行;<input type="hidden" name="${prefix}parent_type" value="${default_parent_type}">

Look about line 73; $default_parent_type= $app_list_strings['record_type_default_key']; and line 83; <input type="hidden" name="${prefix}parent_type" value="${default_parent_type}">

这可以更改为;if($_REQUEST['module'] == 'Contacts'){$default_parent_type = '联系人;}别的{'$app_list_strings['record_type_default_key'];}

代码未经测试,但希望它能为您指明正确的方向.

Code is not tested but hopefully it will point you in the correct direction.

这篇关于如何在 SugarCRM 表单中自动填充字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆