1

I am trying to use SFDX in visual studio code to deploy only changes , and not the entire source

I have changed flexipages, custommetadata and Layout

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>ucinn_ascendv2__Related_List_Setting.RelatedList_ContactReportRelation_Outbou</members>
        <members>ucinn_ascendv2__Related_List_Setting.ucinn_ascendv2__RelatedList_ContactReportRelation</members>
        <name>CustomMetadata</name>
    </types>
    <types>
        <members>Household_Profile_Picture_Collapsible_Sidebar1</members>
        <members>ND_Constituent_Record_Page</members>
        <members>ND_Prospect_Case_Record_Page</members>
        <name>FlexiPage</name>
    </types>
    <types>
        <members>Wealth_Asset__c-Wealth Asset Layout</members>
        <name>Layout</name>
    </types>
    <version>58.0</version>
</Package>

when I execute the command "deploy source in manifest to org" all 6 items error in salesforce deployment status, each giving the following error:

An object 'whatever' of type CustomMetadata was named in package.xml, but was not found in zipped directory

Im at a loss as to why, if my package xml had all types, this wouldnt error, and if i individually deploy a single class, no error, but these items will not deploy

0

2 Answers 2

1

The error you are seeing is because your system cannot find your metadata when creating the package. This is a safeguard to warn you that something went wrong (you will not think that it has been deployed while it was not).

There can be multiple sources, but most of the time this is due to your directory setup.

My initial guess would be that you have set a specific directory for you package uucinn_ascendv2. Way to resolve would be to place the root of that source in the definition of your sfdx-project.json this way sfdx can locate the source directory

sfdx-project.json :

{
"packageDirectories": [
    {
        "path": "force-app",
        "default": true
    },
    {
        "path": "uucinn_ascendv2",
        "default": false
    }
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "58.0",
}

and in your directory you would have something like

yourproject
|- force-app
||- main
|||-default
||||-aura
||||-metadata
||||-classes
||||-...
|- uucina_ascendv2
||- main
|||-default
||||-aura
||||-metadata
||||-classes
||||-...
0

In my case this was problem that our consultant put profile metadata in Metadata API format while for SFDX project metadata is expected in SFDX format.

So changing the file name from

Internal User.profile

to

Internal User.profile-meta.xml

fixes the issue

You must log in to answer this question.

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