从SugarCRM检索数据时出错

时间:2013-01-31 11:56:17

标签: php wordpress-plugin 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->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)

1 个答案:

答案 0 :(得分:0)

可能发生两件事......

  1. 确保您拥有该记录和generak
  2. 中的Leads模块的权限
  3. 我在你的代码中看到一个拼写错误,改变了......

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

        '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