Question
Any tips or tricks for providing a good user experience when a time-based workflow field update can lead to an exception?
BackgroundDetail
For each wrench in the Salesforce toolkit there is often a good choice for error handling. For triggers addError
allows you to delegate the error handling to the code making the DML statement, or have it bubble up to the UI. For VF you have pageMessages to let the user. For time based workflows, no ones home, so what to do? What error handling techniques are good for this case?
Concrete Example
In my scenario we have an approval-ish object (meaning it can be active/inactive), and we limit the number of active objects users can own. We use .addError to display an error message to the user if they try and activate the object and their over the limit. Trouble is, we also use time based workflows to activate them on a specific date.
I'm not an expert on time-based workflow error handling (and can't find anything in the docs), but my understanding is someone gets an email (not sure who) if it fails.
In this case, the field update fails, but this leaves the data in an inconsistent state. Does anyone have some examples of what they've done to handle errors with time based workflow?