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
RedPointRedPoint 

Formula Field not triggering a trigger

I have a trigger on a custom object.  If this custom object is updated any parent objects that have the custom object as a child are updated.  Everything works fine.  However, the custom object has a formula field that is date specific (i.e. if warranty end date is greater than today then "yes" else "no").  The problem is when the formula field changes to "no" (moving from 12/1 to 12/2), the trigger is not triggered; the change of the result in the formula field does not create an update.  How can I make a formula field make an update so the trigger gets used?

Thanks!


Message Edited by RedPoint on 12-02-2008 10:48 AM
RickyGRickyG
Redpoint -

It makes sense to me that the trigger is not fired - formula fields are calculated, which means they are always read-only, and that may exclude them from consideration of triggers.  You could always have another field that is updated with the same conditions as the formula field (through a timed workflow), or run a batch at night that would retrieve newly changed candidates, updated a field and fired the trigger, which might make sense since the granularity of the time seems to be a day.

Hope this helps.
RedPointRedPoint
I wrote a time-based workflow that updates a field on the custom object.  The trigger did not fire.  I noticed that the modify date did not change when the workflow updated the field.  Any one run into a similar issue?  We have Scribe Insight so I may have to use that to get the trigger to fire.  Or do you have an example of a "batch" that you run inside of Salesforce?

Thanks.