Can't read date_entered


After the second save bean I can’t get the field:

        $bean= BeanFactory::newBean('my_project');

then $created_date is null

Even if I do before that $bean= BeanFactory::newBean(‘my_project’, $bean->id);
$created_date will still be null

Are you creating this inside a logic hook?

if true. Then I will recommend to use other word from instead of $bean as that is already used by the current bean.

No, it’s part of a custom API

Got it. Sorry that’s not my expertise. Please check these links. Hope they can give you an idea on how to solve your issue:

Thanks for the answer, but there cases when trying to write down time are considered. I just want to read the already recorded time.
So far, only such a temporary solution: I create a variable where I write the time after the creation of the Bean and later read it

for future readers maybe try “$bean->fetched_row[‘date_entered’]”