[SalesForce] SFDX – force:source:deploy ignoring apiVersion override

Using the SFDX cli, I exported some metadata from a dev org using the manifest option along with a package.xml file. (The package .xml specified api version 37.0)

Now that i'm trying to push the same metadata into another Dev pro org, I'm trying to override the cli apiVersion using the following:

sfdx force:config:set apiVersion=37.0 --global

The command is successful, but my deployment still fails with the following:

    Property 'pageTemplate' not valid in version 45.0
    Property 'pageTemplate' not valid in version 45.0
    Property 'picklist' not valid in version 45.0 (115:13)
    Property 'picklist' not valid in version 45.0 (179:13)
    Property 'picklist' not valid in version 45.0 (263:13)
    Property 'picklist' not valid in version 45.0 (296:13)
    Property 'picklist' not valid in version 45.0 (352:13)

Can anyone guess why the config value is being ignored?

Thanks

Best Answer

I had a play and could set and list the apiVersion (but not random names) so the set part seems to work. Then when I do an sfdx force:source:push this is echoed:

WARNING: apiVersion configuration overridden at "42.0"

If you are not seeing that then I presume the command you are running does not respect that setting.

(Reading the CLI Runtime Configuration Values, there is mention of the sourceApiVersion that is set in the sfdx-project.json file. But that only relates to scratch orgs presumably.)