AnsweredAssumed Answered

$bean->save not working

Question asked by drickferreira on Jun 17, 2015
Latest reply on Jun 27, 2016 by John Lassere
Hello guys, i am a sugarcrm newbie... and try to use some tips like this:
http://developer.sugarcrm.com/2012/03/23/howto-using-the-bean-instead-of-sql-all-the-time/
http://support.sugarcrm.com/02_Documentation/04_Sugar_Developer/Sugar_Developer_Guide_6.5/02_Applica...

But in a logic hook all methods works fine - except $bean->save() - that results a blank screen and error.

A simple example:
$bean = BeanFactory::getBean('accounts', $id);  $bean->name = 'New Name';  $bean->save(); 
If i use :    $bean->db->query('UPDATE accounts SET name="New Name" WHERE id = "'.$id.'"');    this works... 

Outcomes