Reputation: 19
I have an order object with delivery date. I have a process builder flow that runs when the date is > 14 days from today. When it evaluates to true, it creates a scheduled process to run an apex class 14 days before the delivery date. The above all works fine until i start changing the date. since you cannot use scheduled tasks unless you check the advanced option, now it wont reevaluate if the last time it ran it evaluated to true. So if i change the date to a later date, the currently schedualed apex will still run 14 days before the original date, and not the new one. Any workaround would be really appreciated. I was thinking to have a trigger run on order update. If delivery date is changed then delete the process from que and then the process builder will reevaluate on its own. However i cant seem to find if thats possible.
Upvotes: 0
Views: 115
Reputation: 1861
I think this is a perfect scenario for a batch job, just put the process builder logic into a batch job and run it on a daily basis.
Upvotes: 0