You need to sign in to do that
Don't have an account?
David Poynter
Plaguing issues with Due Date field for Tasks in Process Composer
So this issue has been plagging us for a while. Our simple use case is to automatically reassing tasks that are assigned to users who are currently out of office. We have three fields on the user level:
Out of Office replacement user
Out of office start date
Out of office end date
The process builder simply determines if the "Due Date Only" field (API - ActivityDate) is in between the start and end date of the assigned to user, and if it is, runs a flow to reassign it!
The issue is that for some unknown reason we continue to be plagged by errors like "moduleapi.interaction.DateTime cannot be cast to moduleapi.interaction.DateOnly" that revolve around DateTime and Date conversions and formulas, even though supposedly all fields are just simply date fields.
I was reading somewhere however that the ActivityDate field on the task can sometimes have time included somehow? Is this true?
How can I make a process builder that regardless of technically if it is a DateTime or just a Date, it converts it to just a date, and runs the process accordingly. I can't for the life of me figure out some way to sort of do a "Try/Catch" scenario, where it tries casting a DateTime to a date, and then if it fails it assumes it is just a Date to begin with. Or something along those lines.
This issue has been increadibly agrivating and annoying so any help would be greatly appreciated. here is the full error:
Error element myDecision (FlowDecision).
moduleapi.interaction.DateTime cannot be cast to moduleapi.interaction.DateOnly
Flow Details
Flow Name: Out_of_Office_Automatic_Reassignment
Type: Record Change Process
Version: 15
Status: Active
Org: Bernicke Wealth Management, Ltd. (00DF00000006JX5)
Flow Interview Details
Interview Label: Out_of_Office_Automatic_Reassignment-15_InterviewLabel
Current User: Lindsey Hendrickson (0050G000008KmVU)
Start time: 12/20/2018 12:12 PM
Duration: 0 seconds
How the Interview Started
Lindsey Hendrickson (0050G000008KmVU) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = Task (00T2I0000567t2JUAQ)
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!$Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "12/20/2018 12:12 PM"
To me with error makes absolutley no sense, especially since the only fields we are dealing with are Date fields! (supposedly)
Out of Office replacement user
Out of office start date
Out of office end date
The process builder simply determines if the "Due Date Only" field (API - ActivityDate) is in between the start and end date of the assigned to user, and if it is, runs a flow to reassign it!
The issue is that for some unknown reason we continue to be plagged by errors like "moduleapi.interaction.DateTime cannot be cast to moduleapi.interaction.DateOnly" that revolve around DateTime and Date conversions and formulas, even though supposedly all fields are just simply date fields.
I was reading somewhere however that the ActivityDate field on the task can sometimes have time included somehow? Is this true?
How can I make a process builder that regardless of technically if it is a DateTime or just a Date, it converts it to just a date, and runs the process accordingly. I can't for the life of me figure out some way to sort of do a "Try/Catch" scenario, where it tries casting a DateTime to a date, and then if it fails it assumes it is just a Date to begin with. Or something along those lines.
This issue has been increadibly agrivating and annoying so any help would be greatly appreciated. here is the full error:
Error element myDecision (FlowDecision).
moduleapi.interaction.DateTime cannot be cast to moduleapi.interaction.DateOnly
Flow Details
Flow Name: Out_of_Office_Automatic_Reassignment
Type: Record Change Process
Version: 15
Status: Active
Org: Bernicke Wealth Management, Ltd. (00DF00000006JX5)
Flow Interview Details
Interview Label: Out_of_Office_Automatic_Reassignment-15_InterviewLabel
Current User: Lindsey Hendrickson (0050G000008KmVU)
Start time: 12/20/2018 12:12 PM
Duration: 0 seconds
How the Interview Started
Lindsey Hendrickson (0050G000008KmVU) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = Task (00T2I0000567t2JUAQ)
ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!$Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "12/20/2018 12:12 PM"
To me with error makes absolutley no sense, especially since the only fields we are dealing with are Date fields! (supposedly)
This worked and fixed the error! However now it simply doesn't trigger on some of my processes. It works for most, but not others. But at least now it doesn't throw an error. Any ideas?
All Answers
Try the DATEVALUE function in your process builder and then compare values or you can also create a formula field on Activity of Date format and then use it in process builder.
Cheers!!!!
This worked and fixed the error! However now it simply doesn't trigger on some of my processes. It works for most, but not others. But at least now it doesn't throw an error. Any ideas?
In which scenario it doesn’t work?? Could you explain a bit.
Cheers!!!!