1

I am trying to deploy a flexipage that was modified in our repo, but the target sandbox is giving me this error:

Property 'itemInstances' not valid in version 47.0

Based on what I could find in search engine results, itemInstances is something allowed in newer API versions. So it seems like either SFDX is trying to deploy the flexipage with the version number set to 47, or the target org is somehow set to version 47 and won't accept these changes for a newer API version.

What I haven't been able to figure out is how do I tell SFDX to deploy a certain API version for the flexipage? I am a developer and more familiar with deploying Apex code, so if this were a class I would update the meta file's XML to have an updated version number, like so:

<?xml version="1.0" encoding="UTF-8"?>
    <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>49.0</apiVersion>
    <status>Active</status>
</ApexClass>

But when I look at the flexipage meta XML file, that tag doesn't exist. Do I just need to add it? Or is there a different way that is recommended?

2
  • Flexipages are not versioned themselves. What format of force:source:deploy are you using? Or are you using force:metadata:deploy?
    – pchittum
    Sep 3, 2020 at 18:01
  • @pchittum Within the CLI I usually use force:source:deploy -m <metadata type here>:<specific component name here>. However I was not using the CLI, I was using a paid deployment tool that runs on the same ruleset as the SFDX CLI.
    – mjjf
    Sep 4, 2020 at 1:22

1 Answer 1

6

Change the target API version in your sfdx-project.json file, for example:

{
  "packageDirectories": [
    ...
  ],
  "sourceApiVersion": "48.0"
}
2
  • This is the correct answer, it worked. Only problem now is that some of the flexipages are incompatible with API version 49, so I traded one error for 100 new errors...That's not part of this question though. Thank you!
    – mjjf
    Sep 2, 2020 at 20:54
  • 1
    Yeah, we noticed some compatibility issues recently too. A big PITA. Good luck.
    – Phil W
    Sep 2, 2020 at 21:41

You must log in to answer this question.

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