Error overview
You may run into this error when deploying a new or changed Flow item to the target Salesforce org.
An example error message in our app would look as below:
"<xxx> (Action) We can't find an action with the name and action type that you specified."
- where <xxx>
in this example refers to Post_Planting_Seed_Polish
action that Salesforce isn't finding in the target org.
Explanation of the error
Salesforce expects the action referenced in the error message (e.g. Post_Planting_Seed_Polish
) to be present in the target org, before you proceed with the deployment of your Flow.
It's likely Salesforce will not successfully validate your deployment package even when you include the Flow and the action in the same deployment.
Resolution
When deploying via Compare and deploy
Our recommendation is to break the deployment in two parts. Deploy the action first. Once successful, follow up with the deployment of the Flow.
When deploying via Gearset Pipelines
If you're pushing your changes through your Gearset Pipeline, you'd need to create a new pull request from your Dev Sandbox, commit the action into the feature branch, open a PR and promote it through the Pipeline - up to the environment on which the current validation error is happening.
Once this is done, and the CI job has deployed the action to the org, you can then re-validate originally open PR.
Are you updating Dev Sandbox in Gearset Pipelines?
Is the validation error happening when you click on Update now when trying to sync a Dev Sandbox with changes from Main/Master branch?
Workaround
You'll need to follow the guidelines from this document. Click on Select items to deploy... and manually deploy the action to the dev org first.
Once this is done, you'd need to run a second deployment via Compare and deploy, and push the Flow to the org.
Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.