$crud->callbackAfterInsert (
function ($sp) {
$iID = $sp->insertId;
$sp->data['order_desc'] = 'test';
//$iID . $sp->data['order_docs']; // commented out to see if I use a static value as 'test'
return $sp;
}
);
Unfortunately, nothing happens to the filed ‘order_docs’ …
please note that I am using GC Community.
I think I cannot modify the data the way I tried on my previous reply. I should use the `insertId’ to write my own script that will modify the database. Is that true @johnny ??
Thank you.
If I understood your question correctly, yes when we use the after callbacks (e.g. callbackAfterInsert ) then if we would like to have something custom to the database you should do it manually for example: