So I've been reading up on Workflows, Triggers and Email Alerts and what I want to do appears possible without having to write custom Apex stuff.
Our objective is to send email reminders to customers when their yearly maintenance contrats are about to expire.
So I have created a custom field in the Standard object Accounts, called Maintenance Start Date__c. And created a Workflow rule (Create>Workflow & Approvals>Workflow Rules) for Account with a Rule Criteria formula that should evaluate to true as the DATE field is NOT null.
ex. NOT( ISNULL( Maintenance__c ) )
.
My logic is that a Time-Dependent Workflow Action of say 345 Days After Account: Maintenance start date will trigger an email alert. For the email addresses I'm starting with just a test email to myself as a User.
Evaluation Criteria : created, and any time it’s edited to subsequently meet criteria
But the alert is not working when I enter a date in the Maintenance Start Date__c field which is backdated to over 345 days. Both workflow and alert are "Active". Any advice would be appreciated.
Best Answer
Preamble (altered to reflect comment trail)
With a rule
NOT( ISNULL( Maintenance__c ) )
and workflow evaluation criteria of:The workflow rule only executes if the value of the field changes from null to nonNull or when the record is created.
The workflow will not evaluate at all if the
Maintenance__c
changes from one non-null value to another non-null value as that won't "subsequently meet criteria" (true is still true). Note, for time-based workflows, theEvery time it is edited
evaluation radio button is not available.Once the time-based workflow is entered for the object, the object stays in that workflow until the time-based condition is no longer true (maintenance start date becomes null) or the time trigger finally happens (345 days after
account.maintenance_start_date__c
). If the maintenance start date is changed on the Account, the time based trigger adjusts accordingly per the doc:If you were backdating to a date in the past, per the doc, the time trigger does not adjust