List Manager Forum

Custom action (e.g. send email) on Add/Modify/Delete?

User dmitry.donskih 2018-01-29 15:37:55

Hello,

could anyone give me an idea how to implement custom action (in particular, send notification email) when a record is added to a list? Thank you.

Moonsoft support 2018-01-30 08:50:04

Hello,
you can check this source file:

JOOMLA/administrator/components/com_listmanager/models/main.model.php

There you will find the methods that are called when the 'history' option is enabled. This option register actions (add, update,delete) whenever the list is modified, you can use these same methods and introduce any custom action there. These are the methods being called:

_addAccessInsert
_addAccessUpdate
_addAccessDelete

The parameters are the record id and the list id. At the next method (_addAccessWrapper) you can check how to recover record data being added/updated and other user data attached you can use to build your email content.

Hope this helps, regards

User dmitry.donskih 2018-01-30 10:41:04

Looks like exactly what I need! Thanks, I'll give it a try.

...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!