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
GoForceGoGoForceGo 

Creating e-mail notifications for an overdue Task


I want to remind task owner (through e-mail) 2 days before a task is due.
I want to send them another e-mail when the task becomes due (on due date).
Finally I want to send them yet another e-mail if task is overdue by more than 2 days.

Workflow rules on tasks do NOT allow creation of e-mail alerts.

How do I do this?

Salesforce has "Reminder popups" - but this works only if the user logs into the app!






carramrod81carramrod81
i've been thinking about doing this, and getting it to work regardless if the person logs in.

The problem is you need something to trigger a class to do this.
Why don't you do this:
Create 3 custom fields (checkboxes) and don't add them to a page layout on the task object
Create a class to handle the emailing/checking of the flags created in the previous step.
You need to pick an object to make this class fire, lets say account update.

You could setup your account trigger to check the system time, and say between 4 and 5pm every day, on every account update
run a query that checks for these custom fields in all task objects and the task date.
Depending on the task date and the checked flags, you send out an email and then update the proper flag in the task.

I cant think of any other way to do this, since i don't know of any way to setup a time based, non-object trigger. You need something to fire it.

Again this would require at least one perosn updating an account between those times.

I don't know, maybe this is a dumb idea.
GoForceGoGoForceGo
Thanks.

Here is a simpler way, I had just hoped to avoid writing code:

As you said, have 3 check boxes: "E-mail Reminder 1", "E-mail Reminder 2", "E-mail Reminder 3" with default value unchecked and hide them frompage.

1. Write a workflow rule on Task with time-dependent workflow actions that sets these check boxes
2. Write an after update trigger on task which checks that prior value of a "E-mail Reminder 1" was unchecked and current value is checked. If so, send out an e-mail reminder.

One of the issues with this is that the E-mail body must be hard coded or the Template Name must be hard coded or must be set using another Table to define the name of E-mail Template. .When updating that table, one must  check that the template actually exists....



BoxBox
How about a cron job and a web service?
GoForceGoGoForceGo
That might work...but I was looking for something simpler that didn't require another web server.


Box @ HomeBox @ Home

Until there is an APEX batch scheduler that's my current recommendation to our clients, i use a linux box that sits in some server farm somewhere on the planet (no idea where) but that just fires off my jobs for me.

Good luck with it

GoForceGoGoForceGo
Interestingly, E-mail templates don't allow you to use Task Merge fields...

I wonder why Salesforce disallows sending e-mail alerts on Task WorkFlow rules.


goabhigogoabhigo

Did you find solution for this?

SaaspertSaaspert

I am surprised that I can not achieve this using point and click configuration. anybody got this solved ??

WOMD_DogWOMD_Dog

Zoho CRM does this and many other things Salesforce should do but doesn't - I'm thinking of switching back to Zoho; any advice on data migration.

 

Thanks,

 

J