asakusuma/SugarCRM-REST-API-Wrapper-Class — Issue #5: Getting Contact Data from ID...
Author: tabims
Created: 2011-10-25 19:11:42+00:00
State: open

I'm creating a function where I need to be able to pull all of a users' contact info from the database by their id#...

I am trying the following code with no such luck:

get_error();
if($error !== FALSE) {
echo $error['name'];
}

$results = $sugar->get("Contacts",
array(
'id',
'name'),
array('where' =>
'id = "d31f27ce-d8f2-b642-8ed9-4ea1bc3e181f"'));
$sugar->print_results($results);

print_r($results);
echo $results;
?>

I need to be able to pull out the following fields: email, address, zip, phone, etc.. I'm actually creating a pdf out of the information.. which will be created and emailed upon entering of new contact via web lead.

Any advice would be much appreciated. Thanks!