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

0

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

  • 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 at 14:44
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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