AnsweredAssumed Answered

Can't save enum fields using bean

Question asked by Julio Gomes on Sep 12, 2014
Latest reply on Sep 17, 2014 by Julio Gomes
I am trying save a value in the database through "$bean" but it is not possible, when i execute the task, the sugar save the default value in the database.
The default value is "PEND", however i am informing the value "OK" according to code below, what do i doing wrong? Someone can help me?

Follow the code that i am using:

        //Create bean and save bean
        $bean = BeanFactory::newBean('module name');
        $bean->name = 'company name';
        $bean->import_status = 'OK';
        $bean->created_by= true;
        return $bean->save();