Php SugarCRM rest API订单不工作
我尝试对Php SugarCRM rest API订单不工作,php,api,rest,sugarcrm,Php,Api,Rest,Sugarcrm,我尝试对get\u entry\u listrestapi方法返回的记录进行排序,但它不起作用 请求JSON: { "session":"mj95dgk1ldtd2m96u02oj0u3r2", "module_name":"Accounts", "query":"accounts.name LIKE 'Air%'", "order_by":"accounts.name desc", "offset":0, "select_fields":[ ],
get\u entry\u list
restapi方法返回的记录进行排序,但它不起作用
请求JSON:
{
"session":"mj95dgk1ldtd2m96u02oj0u3r2",
"module_name":"Accounts",
"query":"accounts.name LIKE 'Air%'",
"order_by":"accounts.name desc",
"offset":0,
"select_fields":[
],
"link_name_to_fields_array":"",
"max_result":100,
"deleted":0,
"favorites":false
}
我使用的是api版本4.1
即使使用
ASC
或DESC
排序方法,结果也不会排序。这似乎是sugar crm中的错误(错误:59526)
但是您也可以通过创建自己的Api方法来获取记录,我希望这会有所帮助 基于此链接设法解决问题 建议的解决方案: 在服务中/v4/sugarwebserviceoutilv4.php 第89行周围:删除或注释以下行: $order\u by=$seed->process\u order\u by($order\u by,null) 在SugarBean.php(process_order_by)中,如果删除了以下测试,那么修复这个问题肯定会更好:
如果(strchr($value,'.')==false)关于bug,我不确定如何解决,但您可以根据需要创建自己的Api方法!