Hello!
I want to get all the calendar entries in PHP.
With the contacts it has worked:
I try the same with Calendar module, but it doesn't work:Code:<?php function wsLogin($userName, $Password) { require_once('nusoap/nusoap.php'); $client = new nusoap_client('http://trial.sugarcrm.com/jnoydl8667/soap.php?wsdl',true); $auth_array = array( 'user_auth' => array( 'user_name' => $userName, 'password' => md5($Password), ) ); $login_results = $client->call('login',$auth_array); $session_id = $login_results['id']; $user_guid = $client->call('get_user_id',$session_id); $setted_params = array( 'session' => $session_id, 'module_name' => 'Leads', 'name_value_list'=>array( array('name'=>'assigned_user_id', 'value'=>$user_guid))); $result = $client->call('get_entry_list', $setted_params); print_r($result); if($login_results['error']['name']=="No Error") { return "There was no error with the login + $user_guid "; } else { return "There was an error logging in!"; } } $ret = wsLogin('will', 'will'); echo $ret; ?>
It says that the Calendar module does not exists... It's not true because when I list the modules there it is:Code:$setted_params = array( 'session' => $session_id, 'module_name' => 'Calendar', 'name_value_list'=>array( array('name'=>'assigned_user_id', 'value'=>$user_guid))); $result = $client->call('get_entry_list', $setted_params); print_r($result);
Is this because of that I use the Free Trial? I have thought of that, so I tried to install SugarCRM on my localhost, but there were some problems with the install. For example: I "can" login with admin, but can't login with any users that I create. (I've putted can in quotes because when I login with admin account, I get this message:Code://The modules list: $result2 = $client->call('get_available_modules', $session_id); print_r($result2);
"Parse error: syntax error, unexpected $end in" ... "\SugarOS-Full-4.5.1h\include\utils\user_utils.php(112) : eval()'d code on line 1
Fatal error: Call to undefined function authUserStatus() in " ... "\SugarOS-Full-4.5.1h\include\utils.php on line 2772"
and after that when i press reload it don't let me in, but when I navigate again to here "http://localhost/SugarOS-Full-4.5.1h/index.php", it lets me in... [it's weird I think...]
)
Because of that, I tried my PHP code that's above, but it couldn't login.
What is the solution for my real problem: How to get all the calendar entries in PHP?


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks