Workflows and Process Builder on Task Due Dates - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Marc JalandoonMarc Jalandoon 

Workflows and Process Builder on Task Due Dates

Hey y'all!

I'm trying to develop a process under Process Builder, but I'm running into an issue where I'm not able to set dynamic Due Dates. I'll outline it below.

The Use Case
There is currently a custom Object called Grants that has 2 relevant custom fields: Expected Amount (Currency field) and Grant Contract Received (Checkbox). I am looking to develop a process via the Process Builder where if the Expected Amount field is between specific ranges AND the Grant Contract Received box is checked, a list of Tasks are generated via the process (dependent on the $ amount in the Expected Amount field); the list of Tasks generated is essentially our Stewardship protocol for our Development Team to follow up with our individual donors.

So far, I've constructed this (samples of some of the Action Groups):

Criteria for Action Groups
Criteria Name: 250-499
Criteria for Executing Actions: Filter conditions are met
Set Filter ConditionsGrant Contract Received EQUALS True; Expected Amount GREATER THAN OR EQUAL $250.00; Expected Amount LESS THAN $500.00
Filter Conditions: All of the conditions are met
Execute actions when specified changes made to record: Yes


Immediate Actions
Action: Create a Record
Object: Task
Assigned To IDGrant__c.LastModifiedByID
Priority: Normal
Task Record Type ID: [record type]
Subject: Phone Call from Development Lead
Name IDGrant__c.Foundation__c (lookup to m-d between Grants and Accounts)


The problem is that there are several Immediate Actions tied to the different Action Groups, and I'm unable to alter the Due Dates (as an Object Variable) for any of the new Task records created from this process. 

If anyone has any ideas / solutions / workarounds to this (I've scoured our forums!), please let me know! I'm also unable to add a workflow that says "when a task record with Subject = Phone Call from Development Lead is created, set Due Date for that task record to Created Date + 7 days" because Due Date (or ActivityDate) isn't in the Field Update picklist as a field that I can update.


Thanks in advance!
Learning Admin
Best Answer chosen by Marc Jalandoon
Paul FischerPaul Fischer
Hi Marc,

In the same process as when you are  creating the Task I would recommend the following:

Create a custom Activity formula field called "Created Date + 7 Days"
Then on the Task creation step in process builder you can set the "due date only" field to the "Create Date + 7 days"

User-added image

Hope this helps!

All Answers

Paul FischerPaul Fischer
Hi Marc,

In the same process as when you are  creating the Task I would recommend the following:

Create a custom Activity formula field called "Created Date + 7 Days"
Then on the Task creation step in process builder you can set the "due date only" field to the "Create Date + 7 days"

User-added image

Hope this helps!
This was selected as the best answer
Paul FischerPaul Fischer
FYI, the formula for the Today + 7 Days field is just:
 
TODAY() + 7

 
Deepak AnandDeepak Anand
If you're looking to set the Due Date
User-added image

to a "dynamically calculated one" then you have to resort to Formula Field. So the idea is this - 
  1. Create a Formula Field on the Task Object
    • Label: Next Due Date
    • Type: Formula
    • Return Type: Date
    • Formula
      DATEVALUE(CreatedDate) + 7
  2. Then you can set the Due Date Only field to this Formula Field using the Field Picker User-added image
Marc JalandoonMarc Jalandoon
I'm not entirely sure what I'm doing wrong at the moment. I did all of those things above, and I made custom formula fields as well. When I try and trigger the one of the Action Groups while the Process is Active, I don't see any new Task records being created, even though all of the Tasks have "Not Started" as the Status. Secondly, when I try to undo one of the conditions involved in the Action Group while the Process is Active, I'm met with this error:

The record couldn’t be saved because it failed to trigger a flow. 
A flow trigger failed to execute the flow with version ID...

Any possible explanation for this?
Paul FischerPaul Fischer
Hey Marc,

Can you check the criteria filter? It sounds like you should start the process every time a record is "created or edited." 

Also, this is kind of basic, but it I forgot to do it at the beginning, but make sure to activate the process after you create it. It doesn't activate itself.

Then try create a new Grant Contract Received record to see if the process starts, and if a new task record gets created. 

 
MarijaMarija (Salesforce) 
Hello Marc,


The community has provided you with some great suggestions and guidance. 
​​
I hope you were able to get this resolved. 
​​
Please take a moment to mark the most helpful post as "Best Answer" to close off this string and help others in the community with similar questions.  Should you require additional help, please do not hesitate to ask.

Thank you all for your contribution to Success Community.
Adam DyerAdam Dyer
I have gotten this far on my own already and agree witht he advice above. What I'm interested in is whether it's possible to do this same sort of thing but have the date that gets set also evaluate "business hours". So, set a due date of TODAY()+7 business days. Is this even possible? I know there are a number of restrictions on when business days can even be evaluated. I'm fearing this may be one of them... 
Kimberly WargoKimberly Wargo
Next question...
How do I set the reminder date on the task. I want the reminder to be 08:00 AM the day the task is due
Arvind SaxenaArvind Saxena
Fields are available in process builder but it doesnt get updated when you set them in PB
Brian ClarkBrian Clark
@Adam probably a little late but here's a formula I used in the process builder to set the event 3 business days out for 9am PST. (the timevalue has to be UTC so adjust accordingly) 

DATETIMEVALUE(TEXT(YEAR(CASE(MOD(TODAY()- DATE(1900, 1, 7), 7), 0, TODAY()+3, 1, TODAY()+3, 2, TODAY()+3,3, TODAY()+5, 4, TODAY()+5, 5, TODAY()+5, 6, TODAY()+4,null)))+"-" +TEXT(MONTH(CASE(MOD(TODAY()- DATE(1900, 1, 7), 7), 0, TODAY()+3, 1, TODAY()+3, 2, TODAY()+3,3, TODAY()+5, 4, TODAY()+5, 5, TODAY()+5, 6, TODAY()+4,null)))+"-" +TEXT(DAY(CASE(MOD(TODAY()- DATE(1900, 1, 7), 7), 0, TODAY()+3, 1, TODAY()+3, 2, TODAY()+3,3, TODAY()+5, 4, TODAY()+5, 5, TODAY()+5, 6, TODAY()+4,null)))+" "+ "16:00:00")
Adam DyerAdam Dyer
@Brian - I appreciate the reply, but what I'm interested in finding is a way to use one of the defined Org business hours (Setup -> Company Profile -> Business Hours). The formula you have provided would work in certain circumstances, but if the "open hours" of the business were to change then the formula would need to be updated. I believe this also wouldn't account for holidays and such the way org business hours will.

I know org business hours can be referenced for things like this via apex, I'm just really interested to see if this can be achieved via configuration, such as through process builder.  
Kimberly WargoKimberly Wargo
Trying to set the due date to today so the create a record "Task" creates right away. What am I doing wrong as it's not firing??
JP RogersJP Rogers
I usually set field to: Due Date Only, Formula, TODAY(). This is what I've been doing. I'm actually still looking for an answer to your question (March 2016 above) about setting the Reminder Date/Time on Task Create in Process Builder??
 
JP RogersJP Rogers
User-added image
Adam DyerAdam Dyer
You can set the Reminder Date/Time in the same way using the forumla option. I haven't tried forcing it to a specific time yet though
 
Richard CarrRichard Carr
Awesome, found the answer to my question here great news !!!

Regards
 
Patti PaganoPatti Pagano
Hello,  
Looking for help with this.  I created the formula field on the Task.  However when I go to add the formula to process builder it doesnt accept it.  Below Created_Date_Plus_5 is the formula field.  What am I missing here?

User-added image
Don DevostDon Devost
Referring to the "Best Answer" from Paul, does anyone know where and how to do the following?

Create a custom Activity formula field called "Created Date + 7 Days"

Thanks.
Michelle BrownMichelle Brown
{!CreatedDate} + 5 
Martina OmpusungguMartina Ompusunggu
Hi!
What if I want to make 6 rows due date and it stops in the end of the year? The date formula is not counting for next year.
Justin LoveJustin Love
Hi!
I am having the same type of issue. I have three custom fields that I am trying to make co dependant of on another. I have a picklist that is a interval of: Monthly, Semi Annually, and Annually. I want to make a builder that creates a task based on the .LastModifyDate and the picklist choice of the user. Has Anyone done this?
Ricky PitcherRicky Pitcher
I can't find a thread for my exact issue, I think it is relevant to what is being discussed here.
My Salesforce build was designed to record dates against email sends in the Activity panel on each Contacts record.

While this is still working in some cases, no 'due date' is logged for some email sends (specifically External Events, in this example). Can anyone advise me where this rule/process would exist in setup, so I can go in and fix it? 

No 'due date' is being recorded against the email send in the Activity Panel