5

I usually use SFDX to retrieve all of the metadata from my sandbox. I usually work on this in VSCode.

Right now I'm trying to use SFDX in VSCode to retrieve a flow so I can test that flow in another sandbox.

However, when I retrieve the data using "sfdx force:mdapi:retrieve" there is no associated metadata/xml for that flow.

And then during deployment, it says "MissingContentOrMetadataFile: Expected file at path: ..."

Does anyone know how I might properly move this flow from one sandbox to another? What is the best way?

Note: The Flow is not active.

2 Answers 2

10

before retrieve and push the flows , you have to connect source org and target org from vscode using cli commands. then use below commands.

retrieve the flow from source org by using below command:

sfdx force:source:retrieve -m Flow:yourflowName -u sourceorg

push the source in to target org using below command.

 sfdx force:source:deploy -u targetorg
3

In addition to the accepted answer, you can modify your package.xml accordingly. E.g.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <!-- other types removed for brevity -->
    <types>
      <members>*</members>
      <name>Flow</name>
    </types>
    <version>50.0</version>
</Package>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .