0

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

2 Answers 2

1

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.)

2
  • Keith thank you, it was instead that I needed to set "sourceApiVersion". I guess "apiVersion" is related to the version of the CLI itself and not the metadata source
    – Jay
    Jun 17, 2019 at 14:44
  • 1
    I got bitten by this today. Updating the sourceApiVersion in the sfdx-project.json file did the trick for me as well. Can confirm that this also affects using force:source:deploy to move things between orgs (non-scratch orgs) when not using a package.xml file (i.e. if you're using the -p or -m parameters)
    – Derek F
    Jun 16, 2020 at 18:53
0

It seems you have a Picklist & PageTemplate metadata defined.

Metadata picklist is only applicable with version 37.0 and earlier, this is now deprecated.

Use this type in API version 37.0 and earlier only. In later versions, picklist is replaced by valueset.

And same with pageTemplate, which was available only until version 38.0:

Use this field in API versions 33.0 to 38.0 only. In later versions, use template.


You will need to ensure that you update the package.xml to include these tags to be able to deploy it with version 38.0 and later.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.