forked from dlively1/SugarCRM-REST-API-Wrapper-Class
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
50 lines (42 loc) · 854 Bytes
/
Copy pathexample.php
File metadata and controls
50 lines (42 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!doctype html>
<head>
<meta charset="utf-8">
<title>SugarCRM REST API Wrapper Class Example</title>
<style>
body {
color:#333;
font-family:verdana,arial;
font-size:14px;
float:none;
clear:both;
}
div {
padding:4px;
margin:4px;
}
div.first {
border:1px solid #8F8F8F;
margin-bottom:20px;
}
div.second {
border:1px solid #9F9F9F;
}
div.third {
border:1px solid #CCC;
}
div.fourth{
border:1px solid #CFCFCF;
}
</style>
</head>
<body>
<?php
require_once("sugar_rest.php");
$sugar = new Sugar_REST();
$error = $sugar->get_error();
if($error !== FALSE) {
echo $error['name'];
}
$results = $sugar->get_with_related("Accounts", array("Accounts" => array('id','name'), "Cases" => array('id','status')));
$sugar->print_results($results);
?>