Hi all !
I'm trying to let a website send form data to my sugarCRM 5.2k and insert cases.
Using nusoap, I've got a session ID. Case's insertion is perfect, but I need a Contact Id before.
Here is my problem :
I'm requesting an Id on Contacts table by giving a foreign key on Contacts_cstm table thanks to get_entry_list() function. But the only return I received are false, or "Login attempt failed please check the username and password".
However, by calling the get_user_id() function, I receive the Id of the account which I'm connected to Sugar with...
Here is my call :
My website is on a PHP4 server, and I'm using SugarCE 5.2k.PHP Code://-- Configuration
$soap_url = 'http://www.*****.com/soap.php?wsdl';
$soap_login = 'admin';
$soap_pass = md5('***');
//-- Connexion
$soapsugar = new soapclient($soap_url,true);
//-- Connexion parameters
$user_auth = array(
'user_auth' => array(
'user_name' => $soap_login,
'password' => $soap_pass,
'version' => '0.1'
),
'application_name' => 'soapcasadd');
//-- Identification
$result_array = $soapsugar->call('login',$user_auth);
//-- Requesting session Id
$session_id = $result_array['id'];
//-- Parameters I want to receive
$param_entry_list=array(
'session_id'=>$session_id,
'module_name'=>'Contacts',
'query'=>" contacts_cstm.champ_perso_c = '651' ",
'order_by'=>' contacts.id DESC',
'offset'=>0,
'select_fields'=>array('id'),
'max_results'=>0,
'deleted'=>0);
//-- Requesting records
$result = $soapsugar->call('get_entry_list',$param_entry_list);


LinkBack URL
About LinkBacks




Reply With Quote



Bookmarks