2

Your advice on the best way to implement this requirement with workflows?

"1 day after the DateX field is populated, email the Case contact."

So, this requires time dependent workflows. But I don't want the contact to ever be emailed a second time If DateX is ever cleared and populated again.

I also need to make this email go out to contacts from existing records.

So, I was thinking to have the email criteria based on a field of SendEmail. I will manually update the SendEmail field to run the workflow the ones that need to have the email sent retroactively. And have a Field Update workflow set the SendEmail field to True when the DateX is populated.

But then I need a way to tell the workflow to not send the email again if it has ever been sent before. Adding a field update (eg to update a field of EmailSent to true) to the time dependent workflow that sends the email is not going to work because the field update will occur first, and cancel the workflow.

If I add a second time dependent workflow to run 1 hour after the email is sent, to update an EmailSent field to true, that might work in 99% of the cases, but what happens if the record is updated again within that hour (unlikely, I will admit).

Am I overthinking this? Surely there is a straightforward way to achieve this requirement?

Thanks in advance.

1

Oh, of course it was easy! When you step back from the problem and think about it in a new light.

I created a field called SendEmail and created a workflow to set it to TRUE when DateX is first updated

AND(NOT(ISBLANK(DateX_c )), ISCHANGED( DateX_c ), SendEmail__c = False)

Then set that field update to re-evaluate after the workflow runs, then set the Email workflow's criteria to be SendEmail__c = True.

It looks like it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.