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
Kevin Savage 5Kevin Savage 5 

Error Occurred During Flow - Closing Date to be added to Calendar

I am trying to create a flow which will add my closing dates for my opportunities into my calendar.  I contacted Salesforce support but unfortunately they are not able to help with the error I keep getting....    Below is the error report I get when trying to create an opportunity when this flow is activated.  At the bottom it says required field missing [Activity Date], what is this field?  Any help is appreciated. 


This report lists the elements that the flow interview executed. The report is a beta feature.
We welcome your feedback on IdeaExchange.

Flow Details
Flow Name: Closing_Dates
Type: Workflow
Version: 8
Status: Active

Flow Interview Details
Interview Label: Closing_Dates-8_InterviewLabel
Current User: Kevin Savage (005f4000000xem8)
Start time: 9/7/2017 8:32 PM
Duration: 0 seconds

How the Interview Started
Kevin Savage (005f4000000xem8) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = 006f4000002VoSJAA0
myVariable_current = 006f4000002VoSJAA0
RecursiveCountVariable = 0.00

ASSIGNMENT: myVariable_waitStartTimeAssignment
{!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime}
Result
{!myVariable_waitStartTimeVariable} = "9/7/2017 8:32 PM"

DECISION: isChangedDecision2_myRule_1_CloseDate
Executed this outcome: isChangedRule_2_myRule_1_CloseDate
Outcome conditions: and
1. {!myVariable_old} (006f4000002VoSJAA0) Is null false
2. {!myVariable_old.CloseDate} (August 30, 2017) Does not equal {!myVariable_current.CloseDate} (October 1, 2017)
Logic: All conditions must be true (AND)

DECISION: myDecision
Executed this outcome: myRule_1
Outcome conditions: and
1. {!isChangedRule_2_myRule_1_CloseDate} (true) Equals true
Logic: All conditions must be true (AND)

RECORD CREATE: myRule_1_A1
Create one Event record where:
IsAllDayEvent = true
OwnerId = {!myVariable_current.OwnerId} (005f4000000xem8AAA)
Subject = {!myVariable_current.Id} (006f4000002VoSJAA0)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [ActivityDate]. For details, see API Exceptions.
 
Eric JJ van HorssenEric JJ van Horssen
The end of the log mentions:
-----------------
IsAllDayEvent = true
OwnerId = {!myVariable_current.OwnerId} (005f4000000xem8AAA)
Subject = {!myVariable_current.Id} (006f4000002VoSJAA0)
Result
Failed to create record.

Error Occurred: This error occurred when the flow tried to create records: REQUIRED_FIELD_MISSING: Required fields are missing: [ActivityDate]. For details, see API Exceptions.
-----------------

You have not set any Dates for your Event? 

For an AllDayEvent, you can either set ActivityDate (Due Date Only), or if you want the Event to span multiple days, set Start and End Date
Kevin Savage 5Kevin Savage 5
Yes I set the closing date field, I don't get an error but nothing changes in my calendar....  Then when I go back to change the closing date I get this error.
Eric JJ van HorssenEric JJ van Horssen
Hi Kevin, mind you, you are mentioning a Flow, but actually from teh error message, it seems it concerns a Process Builder?

Support should help you with that.

Still do check in your Process Builder, clone it, and teh part where you create the Event, make sure to have a field for the Start Date, and you can reference the Close Date.

Another tip, if you use Lightning, this is something which is built in, you do not even need to create a Process and Event for it:
https://releasenotes.docs.salesforce.com/en-us/summer16/release-notes/rn_sales_activities_calendar_create.htm
https://help.salesforce.com/articleView?id=calendar_create_example_opportunities.htm&type=0