Hi,
I am trying to update a field with the latest number from the database with a before_save logic hook.
However nothing happens! After experimenting it seems it might be something to do with it returning an array and not just the number.
I just want to get the latest number (invoicenumbergeneration_c) as a specific number.
$sqlno = βselect * from aos_invoices_cstm order by invoicenumbergeneration_c desc limit 0, 1 ;β;
$queryno = $db->query($sqlno, true,"Error reading tasks entry: ");
$resultno = $db->fetchByAssoc($queryno);
$numberno = $resultno[invoicenumbergeneration_c];
$bean->resolution = $numberno;
Any ideas?