It was hard for me to work with a sugarCRM module at first without seeing its sugarBean structure and what kind of data or information being populated in a sugarBean. So, I found a way to access any sugarBean object of a module as described below.
Let’s say I want to see the sugarBean of a Call which is a part of Activities module. I would do the following.
1. Put the following code in the index.php file (near the end of the file) and save.
require_once("modules/Calls/Call.php");
$c = new Call();
$c->retrieve("5065c3c0-c95c-a212-cf6f-4dcb0c584b01");
echo "<pre>";
print_r($c);
echo "</pre>";2. Now, go to the web browser and view a webpage in sugarCRM system, you can see the sugarBean object for Call as shown in the picture below.
Code Explanation
The first three lines of the code above includes the path to the Call class, instantiate a new object for a Call and retrieve a record for a Call. If you have created a call in sugarCRM, you can find the id in table “calls”, then pass that id in function “retrieve(call_id)” above.
The rest of the code just displays the sugarBean object for a call referenced by variable $c
To view other sugarBean objects for other modules, you can follow similar steps described above.
