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
Mark WilkesMark Wilkes 

Trigger to create new task or custom object record if due date is changed on an incomplete task


I've already scoured the internet looking for an answer to this. I'm basically trying to come up with a workaround to provide field history tracking on tasks. I've found related threads with suggestions to create a trigger or workflow rule that creates a new task or object record if a field is changed. I've seen some code examples, but nothing that quite fits the bill. I also read that workflow formulas cannot trigger off the ActivityDate field (?), and that this has to be done through Apex. I'm still very new to this.

I'd like to receive notification if an incomplete task's due date is changed. This notification should include the task ID, Subject, Related to, OwnerID (or better yet, UserID of the person who updated the field), old due date value and new due date value.

Any help would be greatly appreciated!
Shivanath DevnarayananShivanath Devnarayanan

Hey Mark,

right now you might have to use APEX, but if you can wait for a week or two .. in spring 15 this should be available to you  (SafeHarbour)

Instead of building a solution in apex you can use workflows...

hope that helps
Mark WilkesMark Wilkes
Do you think this will work specifically on modification of “Due Date”? Mark Wilkes Database Manager DiMarco | Araujo | Montevideo 1324 N. Broadway|Santa Ana|CA 92706 Tel (714) 835-6990 Fax (714) 835-1728 [] Website | Map | Email | Facebook | Twitter | Download Contact Privileged and Confidential Communication This electronic transmission, and any documents attached hereto, (a) are protected by the Electronic Communications Privacy Act (18 USC §§ 2510-2521), (b) may contain confidential and/or legally privileged information, and (c) are for the sole use of the intended recipient named above. If you have received this electronic message in error, please notify the sender and delete the electronic message. Any disclosure, copying, distribution, or use of the contents of the information received in error is strictly prohibited.
Shivanath DevnarayananShivanath Devnarayanan
Yes it would 
Mark WilkesMark Wilkes
It says it's delivered and I've been playing with process builder. I am able to trigger a notification if a due date is changed, but I don't see any way to show old value & new value.

Also, we want to notify a user attached to a custom object that the task is related to. I.e., send notification to the "responsible staff" attached to the custom object that the task itself is attached to.