Triggers system: Difference between revisions

Jump to navigation Jump to search
m
Tag: 2017 source edit
Tag: 2017 source edit
Line 10: Line 10:
=Execute your own code on a Dolibarr business event=
=Execute your own code on a Dolibarr business event=
To execute personalized code after a Dolibarr event (create/modify/remove a third party/invoice/product or other), Dolibarr offers a mechanism of business triggers. This mechanism allows you to personalize a work-flow to have Dolibarr business events being synchronized into another application for example.
To execute personalized code after a Dolibarr event (create/modify/remove a third party/invoice/product or other), Dolibarr offers a mechanism of business triggers. This mechanism allows you to personalize a work-flow to have Dolibarr business events being synchronized into another application for example.
You can also use triggers to modify the behavior of Dolibarr itself: for example, to create a contract automatically when an invoice is validated.
You can also use triggers to modify the behavior of Dolibarr itself: for example, to create a contract automatically when an invoice is validated, a fill a log file when a record is deleted, ...


Note that triggers is a feature for developers that is limited to business CRUD events (Create | Read | Update | Delete). There is another feature for developers to inject custom code in the application called the [[Hooks system]].
Note that triggers is a feature for developers that is limited to business CRUD events (Create | Read | Update | Delete). There is another feature for developers to inject custom code in the application called the [[Hooks system]].

Navigation menu