In Summer 20, we have a possibility of define a "Run mode" of a Visual Flow, to run avoiding user permission, as we can see on this link: Run Flows That Bypass User Permissions.

But when you create a flow, with "System Context Without Sharing-Access All Data" option on "How to run flow" field and pulled it from Scratch org to your local branch, you receive a flow metadata (xml) without any reference to this "Run mode". In related link (Tooling API New and Changed Objects ), they refer to a runInMode field and SystemModeWithoutSharing (enum) option to set you flow without user permission... but it isn't on metadata. Look at this flow metadata example:

<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
    <interviewLabel>test {!$Flow.CurrentDateTime}</interviewLabel>

Any ideas how to add this "RunInMode" and "SystemModeWithoutSharing" on flow metadata?

1 Answer 1


I just tried this and it works without any issues.

Here are couple of steps I recommend you double check,

  1. Make sure you are on latest version of SFDX CLI by running sfdx update
  2. Make sure the apiVersion is specified as 49.0

In your sfdx-project.json make sure it is 49.0

    "sourceApiVersion": "49.0",
  • 1
    Yes! I justed updated SFDX CLI, but the version was 47.0. Now I changed to 49.0 and works fine! Thanks a lot! Commented Jul 21, 2020 at 3:07

You must log in to answer this question.

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