AnsweredAssumed Answered

How to get data via BeanFactory in custom file ?

Question asked by Autchara Chaiprom on Jan 27, 2016
Latest reply on Feb 12, 2016 by Autchara Chaiprom

I try to use BeanFactory to get data in Case module but nothing return.

 

$bean = BeanFactory::getBean('Cases');
$bean->retrieve('id');
$name = $bean->name;
echo $name;

 

Ref:

http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.5/API/Classes/BeanFactory/

 

How to use BeanFactory in custom file ?

SugarCRM Enterprise, Version 7.6.1.0 (Build 1163)

 

Thanks,

M

 

---------------------------- More ------------------------------

I got this error when put ini_set('display_errors', 1); into my code.

Fatal error: Class 'BeanFactory' not found in /sugarcrm/addon/reminder/testBean.php on line 26

Outcomes