Skip to main content

Resolving validation errors - "Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}dayOfMonthToRun invalid at this location in type FlowSchedule" on Flows

Cause and solution to this Salesforce validation error: " Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}dayOfMonthToRun invalid at this location in type FlowSchedule"

Vincent Maltby avatar
Written by Vincent Maltby
Updated over a week ago

Error Overview

When trying to deploy a Flow that was built on a org on the Spring '26 release of Salesforce that includes a FlowSchedule, to an org that has not yet been upgraded to the Spring '26 release of Salesforce, the error Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}dayOfMonthToRun invalid at this location in type FlowSchedule is received during deployment validation.

When selecting a version of the metadata API below Version 66 during a comparison, the fields of <dayOfMonthToRun> and <frequencyNumber> are surfaced even though they are not supported.

These fields are only supported on orgs that are on the Spring '26 version of Salesforce.

More information on those fields can be found here

These fields look like this in your Flow in a comparison

<schedule>

<dayOfMonthToRun>0</dayOfMonthToRun>

<frequency>Weekly</frequency>

<frequencyNumber>0</frequencyNumber>

<startDate>2026-02-01</startDate>

<startTime>01:00:00.000Z</startTime>

</schedule>

Resolution

To work around this issue and deploy your Flow to an org that has not yet been updated to the Spring '26 version of Salesforce the following steps need to be followed:

  • Download the deployment package from the failed validation.

  • Unzip that package

  • Open the .flow file from in the Flow folder that matches the name of the flow you are getting the validation error on

  • Manually edited the file to remove the two lines of code for those fields

    • They will look like:

      <dayOfMonthToRun>0</dayOfMonthToRun>

      <frequencyNumber>0</frequencyNumber>

  • Save the file

  • Zip the deployment package back up.

  • Using a Compare and Deploy, select the Local Files option as the source.

    • Select your newly created zip deployment package

  • Select the org you want to deploy too as the target.

  • Validate and deploy

Once the rollout of the Spring '26 Version of Salesforce is complete, this should no longer be an issue

Did this answer your question?