Is there any way to trigger custom code with the change of a given field in a record.
I have a model for running Logic Hooks on a “Record” update (before_save), that allows me to run some custom code and inject results into the bean before it gets saved into the Dbase, but I have a new use case where I ONLY want to run a certain function when a specific field is updated, not ‘every’ time the record is saved, but rather ONLY IF the field is updated.
I can think of a way to do this perhaps like this:
- Trigger the Before Save logic hook
- lookup the record that’s being saved in the Dbase
- compare the specific field I’m focused on to the value in the Dbase
- IF NOT a match, run my custom code
But it seems like this might be easier to do???
Is there a better way??
Is it possible to trigger custom code via workflow?? (and watch for the field update there, instead??)