SugarCRM:如何让“名字”成为我的名字? 和“致敬” “将潜在客户转换为联系人”中的必填字段 形式?

发布于 2024-07-10 16:01:23 字数 705 浏览 4 评论 0原文

我们使用 SugarCRM 的定制安装,我需要对“将潜在客户转换为联系人”表单进行更改。 在表单上,​​只有“姓氏”被标记为必填项,但如果用户没有输入称呼或名字,Sugar 将在插入时抛出 SQL 错误(因为称呼和名字是联系人的必填字段)。

我尝试将此行添加到“modules/Contacts/metadata/editviewdefs.php”和“modules/Contacts/metadata/quickcreatedefs.php”:

array (
'name' => 'first_name',
'displayParams'=>array('required'=>true),
)

我正在尝试其他修改,但我在网上找不到任何关于此的内容问题。 我将用我的发现更新这个问题。 谢谢!

更新:将“first_name”和“salutation”添加到“modules/Contacts/field_arrays.php”中的“required_fields”数组中,没有帮助。

更新:这是在 SugarCRM 5.1 上。 这项工作是在升级到 5.1 期间进行的。

更新:将以下行添加到“modules/Contacts/vardefs.php”的“email_and_name1”数组中,没有帮助。

'required' => 'true',

We use a customized installation of SugarCRM and I need to make a change to the "Convert Lead to Contact" form. On the form, only "last name" is marked as required, but if the user does not enter a salutation or first name, Sugar will throw an SQL error on the insert (because salutation and first name are required fields for contacts).

I've tried adding this line to "modules/Contacts/metadata/editviewdefs.php" and "modules/Contacts/metadata/quickcreatedefs.php":

array (
'name' => 'first_name',
'displayParams'=>array('required'=>true),
)

I'm trying other modifications but I can't find anything online yet on this exact problem. I will update this question with my findings. Thanks!

Update: Added "first_name" and "salutation" to the 'required_fields' array in "modules/Contacts/field_arrays.php", did not help.

Update: This is on SugarCRM 5.1. This work is happening during the upgrade to 5.1.

Update: Added the following line to "modules/Contacts/vardefs.php" the "email_and_name1" array, did not help.

'required' => 'true',

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

左耳近心 2024-07-17 16:01:23

以上对我不起作用。 我正在使用5.2.0。

对我有用的是编辑 custom/modules/{modulename}/metadata/editviewdefs.php 并添加:

'name' => '名',
'显示参数' =>
大批 (
'必需' => 真的,
),

然后快速修复/重建。

The above didn't work for me. I am using 5.2.0.

What worked for me was to edit custom/modules/{modulename}/metadata/editviewdefs.php and add:

'name' => 'first_name',
'displayParams' =>
array (
'required' => true,
),

Then quick repair/rebuild.

若无相欠,怎会相见 2024-07-17 16:01:23

我似乎已经找到了解决办法。 我在“custom/Extension/modules/Contacts/Ext/Vardefs”中创建了一个名为“custom.php”的升级文件。 文件的内容如下:

<?php
$dictionary['Contact']['fields']['salutation']['required'] = true;
$dictionary['Contact']['fields']['first_name']['required'] = true;
?>

在我进行“快速修复和重建”之后,现在需要称呼和名字。 这对我有用。

I appear to have figured out a solution. I created an upgrade file in "custom/Extension/modules/Contacts/Ext/Vardefs" called "custom.php". The contents of the file are below:

<?php
$dictionary['Contact']['fields']['salutation']['required'] = true;
$dictionary['Contact']['fields']['first_name']['required'] = true;
?>

After I did a "quick repair and rebuild", the salutation and first name were now required. This works for me.

爱你是孤单的心事 2024-07-17 16:01:23

为什么不在潜在客户中将拳名和称呼设为必填字段? 然后您可以直接在 Studio 中将字段修改为“必需”,而不必担心升级安全性。

Why not just make Fist Name and Salutation required fields in Leads? Then you can modify the fields to "required" right in Studio and not have to worry about upgrade security.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文