0

我通过 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)
4

1 回答 1

0

可能发生两件事...

  1. 确保您对该记录和generak 中的Leads 模块具有权限
  2. 我在你的代码中看到一个错字,改变......

    'query' => "id like 5180dfeb-8a3f-51ca-2eaa-510921ef1da6"
    

……到这个

    'query' => "id = '5180dfeb-8a3f-51ca-2eaa-510921ef1da6'"

...或者更好的是,使用 get_entry() 调用

http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_6.5/02_Application_Framework#Call:_get_entry%28%29

于 2013-01-31T14:00:41.580 回答