Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
You can test the resource event listener working like this:
class Customer extends Resource
{
...
protected function onRecordUpdating($params)
{
echo "onRecordUpdating";
exit;
...
return true;
}
An error dialog with "onRecordUpdating" text will appear. Then replace the echo and exit commands with your database logic code.
Okay thx. Another question :-) While using the following
public function updateRecord($ids, $data){
I've noticed that the $data object only contains the changed fields/properties (names and values) when using the detailspage edittor (not the inline edit), but is there also a possibility to send other (unchanged) properties as well, like a so called 'dirtyField'? Because I need some values to compare in my logic.
Update: nevermind, found it: https://www.koolreport.com/docs/dashboard/admin/fields/#properties ( shouldUpdate(true) )
With kind regards, Marloes
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo