Skip to content

[BUG]: sf project retrieve start -m Flow:flowName retrieves the latest version of the flow, not the active version #3698

Backlog

Description

@jpaulamaki

Before You Submit

  • I'm using the latest version of Salesforce CLI
  • I've searched the existing issues
  • I've run sf doctor to diagnose common issues

Related Issue

No response

Command

sf project retrieve start -m Flow:flowName

Org Type

Sandbox

Did this work before?

Not sure

Last Working Version

No response

Summary

When using Change Sets, the active version is always moved, and only if there are no active versions, then the latest version will be moved.

I believe this has been the functionality with sf project retrieve / deploy when deploying flows as well, but I can't swear to it. I've noticed this now in the past few weeks a few times, was wondering how come the flow I fetch comes as Draft when I've activated the version I've been working on, and only few days ago was able to pinpoint this.

Repository to Reproduce

No response

Steps to reproduce

  1. Create a flow, activate it
  2. Create a new version of the flow, don't activate the new version, but save it
  3. sf project retrieve start -m Flow:flowName -o your-favorite-dev-sandbox
  4. sf project deploy start -d force-app/main/default/flows/flowName[etc].xml

Expected Result

The active version was fetched and deployed

Actual Result

The inactive version was fetched and deployed

Error Message

no errors

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.161.11",
  "nodeVersion": "node-v26.13.1",
  "osVersion": "Darwin 27.2.0",
  "rootPath": "/Users/johanna.paulamaki/.local/share/sf/client/2.161.11-9dd54bc",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 4.0.6 (core)",
    "@oclif/plugin-commands 5.0.13 (core)",
    "@oclif/plugin-help 7.0.10 (core)",
    "@oclif/plugin-not-found 4.0.7 (core)",
    "@oclif/plugin-plugins 7.0.18 (core)",
    "@oclif/plugin-search 2.0.14 (core)",
    "@oclif/plugin-update 5.0.10 (core)",
    "@oclif/plugin-version 3.0.11 (core)",
    "@oclif/plugin-warn-if-update-available 4.0.5 (core)",
    "@oclif/plugin-which 4.0.11 (core)",
    "@salesforce/cli 2.161.11 (core)",
    "agent 2.4.0 (core)",
    "apex 4.4.7 (core)",
    "api 2.0.30 (core)",
    "auth 6.0.7 (core)",
    "data 5.1.29 (core)",
    "deploy-retrieve 4.3.3 (core)",
    "info 4.0.27 (core)",
    "limits 4.0.6 (core)",
    "marketplace 2.0.29 (core)",
    "org 7.0.17 (core)",
    "packaging 3.0.17 (core)",
    "schema 4.0.17 (core)",
    "settings 3.0.30 (core)",
    "signups 3.0.18 (user) published 17 days ago (Sun Nov 15 2026)",
    "sobject 2.0.28 (core)",
    "telemetry 4.2.10 (core)",
    "templates 57.7.3 (core)",
    "trust 4.1.6 (core)",
    "user 6.0.13 (core)",
    "sfdmu 5.8.0 (user) published 151 days ago (Fri Jul 03 2026)",
    "sfdx-git-delta 6.45.1 (user) published 159 days ago (Fri Jun 26 2026)",
    "sfdx-plugin-source-read 1.7.1 (user) published 89 days ago (Fri Sep 04 2026)"
  ]
}

Additional Information

No response

Screenshots or Log Files

No response

Activity

  1. added
    investigating
    on Dec 2, 2026
  2. github-actions commented on Dec 2, 2026

    @github-actions

    Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

  3. added
    validated
    on Dec 2, 2026
  4. jfeingold35 commented on Dec 2, 2026

    @jfeingold35

    @jpaulamaki , I'm unable to reproduce this on my end. I've set up an org, created a flow, activated it, saved a new version, and done the retrieve, and I always get the latest version. Is this exclusive to sandboxes, or are you able to reproduce it in scratch orgs too?

  5. removed
    validated
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigating

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions