我在Accounts模块中添加了一些额外的字段。还为详细搜索添加了相同的字段。一个字段是十进制,另一个文本,从下拉菜单填充。运行测试后,一切看起来都很好。但不久前我需要查看搜索中的所有项目。使用我添加的新字段作为参数进行搜索。您可能已经知道,在糖crm中搜索仅显示前20项。因此,在尝试访问另外20个项目后,我有一个空列表。 sugarcrm.log向我显示了sql查询错误:
11/12/12 00:09:33 [6300][ca4960aa-6cce-065a-be1d-4fa7b40db052][FATAL] Query Failed:SELECT TOP 21 * FROM
(SELECT ROW_NUMBER()
OVER (ORDER BY accounts.name) AS row_number,
accounts.id ,
**accounts_cstm.print_srv_prov_c**,
accounts.name ,
accounts.billing_address_city ,
accounts.billing_address_country ,
accounts.phone_office ,
LTRIM(RTRIM(ISNULL(jt0.first_name,'')+N' '+ISNULL(jt0.last_name,''))) assigned_user_name ,
jt0.created_by assigned_user_name_owner ,
N'Users' assigned_user_name_mod,
accounts.annual_revenue ,
accounts.account_type ,
**accounts_cstm.print_srv_prov_c** ,
accounts.assigned_user_id
FROM accounts
LEFT JOIN accounts_cstm ON accounts.id = accounts_cstm.id_c
LEFT JOIN users jt0 ON accounts.assigned_user_id=jt0.id AND jt0.deleted=0 AND jt0.deleted=0
where ((accounts.account_type in (N'potencial_client') ) AND ( accounts_cstm.print_srv_prov_c in (N'itel'))) AND accounts.deleted=0
) AS a
WHERE row_number > 20::: [Microsoft][SQL Server Native Client 10.0][SQL Server]The column 'print_srv_prov_c' was specified multiple times for 'a'.
所有字段都是使用Studio工具添加的,源代码完好无损。
发生sql错误,因为列accounts_cstm.print_srv_prov_c
被使用了两次。为什么会这样,以及如何解决它。
我正在使用SugarCRM CE 6.4.4