function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to write a trigger on an updated field

We monitor customer revenue with a custom field, that is updated every day (history tracking is activiated). 
Whenever the revenue falls below a certain percantage threshold I would like to triigger an alert email or task. 
I found out that i can use <after update> for custom fileds but am quite lost on the next steps. 
Thanks for your help! 
I don't think you need to write a trigger for a field update for this. You should try using process builder or workflows.
I didn't find a way to work with workflows based upon changes of a field. 
Can you expand on why workflows didn't work? From what you wrote, it sounds like your critiera fits for a workflow or process builder. 
Well I can't acess the prior days value via the workflow I built. I read about the formular PRIORVALUE() but it won't allow me to use this in my workflow. I am very new to all this, so I might be doing something wrong though.