8

I'm having a problem deploying metadata after having updated my project to Summer 20 and pushing the project contents to a Summer 20 org. There are several failures seemingly related to a FlexiPage problem with the componentInstances property of FlexiPageRegion.

─────  ──────────────────────────────────────────────────────────────────────────  ────────────────────────────────────────────────────────────────────
Error  force-app/main/default/applications/LWC_Recipes.app-meta.xml                In field: tab - no CustomTab named Hello found
Error  force-app/main/default/tabs/X3rd_Party_Libs.tab-meta.xml                    In field: flexiPage - no FlexiPage named X3rd_Party_Libs found
Error  force-app/main/default/tabs/Wire.tab-meta.xml                               In field: flexiPage - no FlexiPage named Wire found
Error  force-app/main/default/tabs/Pub_Sub.tab-meta.xml                            In field: flexiPage - no FlexiPage named Pub_Sub found
Error  force-app/main/default/tabs/Parent_to_Child.tab-meta.xml                    In field: flexiPage - no FlexiPage named Parent_to_Child found
Error  force-app/main/default/tabs/Navigation.tab-meta.xml                         In field: flexiPage - no FlexiPage named Navigation found
Error  force-app/main/default/tabs/Events.tab-meta.xml                             In field: flexiPage - no FlexiPage named Events found
Error  force-app/main/default/tabs/Hello.tab-meta.xml                              In field: flexiPage - no FlexiPage named Hello found
Error  force-app/main/default/tabs/Misc_Techniques.tab-meta.xml                    In field: flexiPage - no FlexiPage named Misc_Techniques found
Error  force-app/main/default/tabs/Data_Service.tab-meta.xml                       In field: flexiPage - no FlexiPage named Data_Service found
Error  force-app/main/default/tabs/Composition.tab-meta.xml                        In field: flexiPage - no FlexiPage named Composition found
Error  force-app/main/default/tabs/Aura_Interoperability.tab-meta.xml              In field: flexiPage - no FlexiPage named Aura_Interoperability found
Error  force-app/main/default/tabs/Apex.tab-meta.xml                               In field: flexiPage - no FlexiPage named Apex found
Error  force-app/main/default/flexipages/X3rd_Party_Libs.flexipage-meta.xml        Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Wire.flexipage-meta.xml                   Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Apex.flexipage-meta.xml                   Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Aura_Interoperability.flexipage-meta.xml  Property 'componentInstances' not valid in version 49.0 (3:23)
Error  force-app/main/default/flexipages/Composition.flexipage-meta.xml            Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Contact_Record_Page.flexipage-meta.xml    Property 'componentInstances' not valid in version 49.0 (3:23)
Error  force-app/main/default/flexipages/Data_Service.flexipage-meta.xml           Property 'componentInstances' not valid in version 49.0 (3:23)
Error  force-app/main/default/flexipages/Events.flexipage-meta.xml                 Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Hello.flexipage-meta.xml                  Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Misc_Techniques.flexipage-meta.xml        Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Navigation.flexipage-meta.xml             Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Parent_to_Child.flexipage-meta.xml        Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/flexipages/Pub_Sub.flexipage-meta.xml                Property 'componentInstances' not valid in version 49.0 (7:23)
Error  force-app/main/default/permissionsets/recipes.permissionset-meta.xml        In field: tab - no CustomTab named Apex found

Note especially all the failures Error ...Some.flexipage-meta.xml Property 'componentInstances' not valid in version 49.0....

If I deploy the file to a Spring 20 org, it works just fine. But the moment I try to deploy to a (currently prerelase) Summer 20 org, it fails, whether using the CLI on API v48.0 or v49.0.

15

In the Summer 20 release, the componentInstances property for FlexiPage regions has been removed. These need to be replaced with itemInstances as outlined in the release notes. More details on the structure of an ItemInstance metadata type is in the guide.

For orgs that have been refreshed into the new version (like sandboxes and your production org at the time of GA), the structure of your metadata XML will pull down automatically with the new metadata format as and when it is upgraded to the Summer 20 release.

If you are working from VCS pushing your source that worked on API v48.0 to an org that is running Summer20 on v49.0, you'll have to manually update the XML structure.

To update the XML manually, the new structure is documented in the MD API guide linked above, but just make sure you have one <itemInstances> tag surrounding every <componentInstance> tag in your new XML structure. Here's an example before/after from the file I tested this on for one <flexiPageRegions> config:

Before

<flexiPageRegions>
    <componentInstances>
        <componentName>apexWireMethodWithParams</componentName>
    </componentInstances>
    <componentInstances>
        <componentName>apexImperativeMethodWithParams</componentName>
    </componentInstances>
    <componentInstances>
        <componentName>apexWireMethodWithComplexParams</componentName>
    </componentInstances>
    <componentInstances>
        <componentName>apexImperativeMethodWithComplexParams</componentName>
    </componentInstances>
    <name>region4</name>
    <type>Region</type>
</flexiPageRegions>

After

<flexiPageRegions>
    <itemInstances>
        <componentInstance>
            <componentName>apexWireMethodWithParams</componentName>
        </componentInstance>
    </itemInstances>
    <itemInstances>
        <componentInstance>
            <componentName>apexImperativeMethodWithParams</componentName>
        </componentInstance>
    </itemInstances>
    <itemInstances>
        <componentInstance>
            <componentName>apexWireMethodWithComplexParams</componentName>
        </componentInstance>
    </itemInstances>
    <itemInstances>
        <componentInstance>
            <componentName>apexImperativeMethodWithComplexParams</componentName>
        </componentInstance>
    </itemInstances>
    <name>region4</name>
    <type>Region</type>
</flexiPageRegions>

When I ran into this, I took the opportunity to record a little video walk through of fixing one of my failing Flexipage metadata files. You can see it here.

| improve this answer | |

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.