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
sfdev1sfdev1 

Workflow trigger

How did I use the workflow rules to fire off a Apex code class?
JimRaeJimRae
You could use a field update workflow action to change the value of some field, then have a trigger on the object you are updating fire, and execute logic after validating that your workflow updated field was what got changed.
Or, you could use CronKit.  Cronkit allows you to schedule and fire apex code classes, and leverages workflow timing actions.  It is available on the AppExcahnge.
AishAish
You can update field or create Task upon workflow rule trigger. You could write an Apex trigger to be triggered off of the newly created Task or a dummy field update on the object you want the Apex code to be triggerred off of.
Jon Mountjoy_Jon Mountjoy_
It's great to hear about the field update trick.

However, I've just looked on Ideas to see if someone's proposed a more direct way - and I can't find any such idea.   Perhaps it's worth you adding an Idea there?

Regards,
Jon