2

I have a flow that was declaratively defined and I am attempting to add it to source-control. I am seeing other posts about versioning the flows in CI/VC tools but leaving that aside for now.

I am working in VS Code, I have a project with manifest - I added the following to my package.xml:

    <types>
        <members>*</members>
        <name>Flow</name>
    </types>
    ...
    <version>48.0</version>

I've retrieved the metadata, and when I attempt to deploy it from VS-Code I get an error:

Property 'getFirstRecordOnly' not valid in version 46.0 (343:20)

Sure enough, this property is in my metadata definition file and per. documentation, this property was added in API Version 47.0

However, I cannot find an "API Version" Property for the Flow in the metadata?

2
  • what's the sourceApiVersion in the sfdx-project.json? Apr 1, 2020 at 21:02
  • @KrisGoncalves that was the issue, I updated it to 48.0 and it worked! Apr 1, 2020 at 22:24

1 Answer 1

2

You'll have to make sure you sourceApiVersion is 47.0 or higher in your sfdx-project.json file.

The documentation about Salesforce DX Project Configuration mentions the following:

The sourceApiVersion determines the fields retrieved for each metadata type during source:push, source:pull, or source:convert. This field is important if you’re using a metadata type that has changed in a recent release. You’d want to specify the version of your metadata source.

You must log in to answer this question.

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