Skip to main content

Flow appears as New when it exists in the target org

Why a Flow might appear as 'New' in a Gearset comparison despite the same Flow existing in the target org.

Written by Chris Mead

Summary

If Flows appear as New in a comparison, but they already exist in the target org, the issue might be that a Salesforce Metadata API limit has been reached when the flows are being surfaced to Gearset.

The issue

Salesforce enforces a hard limit of 10,000 records when retrieving metadata over the Metadata API using a wildcard. This also applies to Flows.

If an org has more than 10,000 records across Flow versions in total, the retrieval fails silently for the affected Flows.

A flow can have up to 50 versions, so if you have 200 flows, you could have 10,000 flow records.

This is a Salesforce Metadata API limitation, you can work around this by deleting obsolete Flow versions in the source and target.

It's not possible to delete specific versions of a Flow via the metadata API, so this must be done manually.

There is also a Salesforce notification on the number of flow versions that can be retrieved currently as noted here

How to confirm this is the cause

  1. Use Workbench to retrieve the Flow metadata using a .* wildcard in the package xml to retrieve all flow records. Further information on how to do this can be found here

  2. If Workbench also fails to return the Flow, this confirms the issue is with the Metadata API, not Gearset.

For a more detailed guide on how to use Workbench to replicate retrieval issues, see our documentation here

Resolution

  • Delete obsolete Flows and Flow versions to bring the number of flow records in your org under the 5,000 limit.

  • Specify the flow you want to retrieve in the metadata filter in your comparison in Gearset.

    If you have any queries or concerns, please feel free to reach out to us via our in-app chat.

Did this answer your question?