Hello folks,
with a ModuleBuilder created module, what is the best way to implement automatically generated events (entries to agenda), e.g. created, deleted, different kinds of modification (validate, enable, …).
The type-code would be AC_OTH_AUTO
One way could be:
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $actioncomm = new ActionComm($object->db); //set all $actioncomm attributes $actioncomm->create($user);
But how could I use already in place mechanisms? For instance with an
$object->update($user) // triggers enabled
the trigger MyClassName_MODIFY
will be issued.
Can I use this somehow?
But what if I want to handle other things like VALIDATED, CANCLED, …?