Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/232.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 从SugarCRM检索数据时出错_Php_Wordpress_Sugarcrm - Fatal编程技术网

Php 从SugarCRM检索数据时出错

Php 从SugarCRM检索数据时出错,php,wordpress,sugarcrm,Php,Wordpress,Sugarcrm,我通过SugarCRM检索数据,然后它显示以下类型的错误: $accountParams = array('session' => $session_id, 'module_name' => 'Leads','query' => "id like 5180dfeb-8a3f-51ca-2eaa-510921ef1da6", 'order_by' => '', 'deleted' => 0); $accountId = $soapclient->cal

我通过SugarCRM检索数据,然后它显示以下类型的错误:

 $accountParams = array('session' => $session_id, 'module_name' => 'Leads','query' => "id like 5180dfeb-8a3f-51ca-2eaa-510921ef1da6", 'order_by' => '', 'deleted' => 0);
    $accountId = $soapclient->call('get_entry_list', $accountParams);
    var_dump($accountId);


array
  'result_count' => int -1
  'error' => 
    array
      'number' => string '40' (length=2)
      'name' => string 'Access Denied' (length=13)
      'description' => string 'You do not have access' (length=22)

array
  'id' => string 'nmrcjiso5b2aqq7htc9oski9j7' (length=26)
  'error' => 
    array
      'number' => string '0' (length=1)
      'name' => string 'No Error' (length=8)
      'description' => string 'No Error' (length=8)

可能会发生两件事

  • 确保您有权访问该记录和generak中的Leads模块
  • 我在你的代码中看到一个输入错误,更改

    'query' => "id like 5180dfeb-8a3f-51ca-2eaa-510921ef1da6"
    
  • …对这件事

        'query' => "id = '5180dfeb-8a3f-51ca-2eaa-510921ef1da6'"
    
    …或者更好的方法是使用get_entry()调用


    我不熟悉SugarCRM,但如果我们能看到您用于发出请求的代码,这可能会有所帮助—请将其编辑到您的问题中。顺便说一句,这里一般不鼓励使用缩写的“text speak”-因此可以将“plz”等扩展到真正的英语-谢谢。如果我这样写,它会显示布尔flase“query”=>“id='5180dfeb-8a3f-51ca-2eaa-510921ef1da6'”