1

I'm having an issue when deploying a dashboard from a sandbox to a production instance using Change Sets and the Salesforce CLI. Both result in the same error message:

TYPE   FILE                                                                                          NAME                                      PROBLEM
─────  ────────────────────────────────────────────────────────────────────────────────────────────  ────────────────────────────────────────  ────────────────────────────────────────────
Error  sdx_sourceDeploy_1578924795973/dashboards/Comercial/pFhXZfdKBxLgrwAtaQFKqttkMWDiig.dashboard  Comercial/pFhXZfdKBxLgrwAtaQFKqttkMWDiig  Required fields are missing: [ReportColumn]


PROJECT PATH                                                                                   ERROR
─────────────────────────────────────────────────────────────────────────────────────────────  ────────────────────────────────────────────
force-app/main/default/dashboards/Comercial/pFhXZfdKBxLgrwAtaQFKqttkMWDiig.dashboard-meta.xml  Required fields are missing: [ReportColumn]

Funny thing is that there was a Known Issue (Reference W-4838276) that described the same error.

The following metadata is what I'm attempting to deploy:

<?xml version="1.0" encoding="UTF-8"?>
<Dashboard xmlns="http://soap.sforce.com/2006/04/metadata">
    <backgroundEndColor>#FFFFFF</backgroundEndColor>
    <backgroundFadeDirection>Diagonal</backgroundFadeDirection>
    <backgroundStartColor>#FFFFFF</backgroundStartColor>
    <chartTheme>light</chartTheme>
    <colorPalette>unity</colorPalette>
    <dashboardChartTheme>light</dashboardChartTheme>
    <dashboardColorPalette>unity</dashboardColorPalette>
    <dashboardGridLayout>
        <dashboardGridComponents>
            <colSpan>12</colSpan>
            <columnIndex>0</columnIndex>
            <dashboardComponent>
                <autoselectColumnsFromReport>false</autoselectColumnsFromReport>
                <componentType>FlexTable</componentType>
                <flexComponentProperties>
                    <decimalPrecision>-1</decimalPrecision>
                    <flexTableColumn>
                        <reportColumn>Product2.Cidade__c</reportColumn>
                        <showSubTotal>false</showSubTotal>
                        <showTotal>false</showTotal>
                        <type>detail</type>
                    </flexTableColumn>
                    <flexTableColumn>
                        <reportColumn>NAME</reportColumn>
                        <showSubTotal>false</showSubTotal>
                        <showTotal>false</showTotal>
                        <type>detail</type>
                    </flexTableColumn>
                    <flexTableColumn>
                        <reportColumn>Product2.TipologiaNome__c</reportColumn>
                        <showSubTotal>false</showSubTotal>
                        <showTotal>false</showTotal>
                        <type>detail</type>
                    </flexTableColumn>
                    <flexTableColumn>
                        <reportColumn>Product2.AreaInterna__c</reportColumn>
                        <showSubTotal>false</showSubTotal>
                        <showTotal>false</showTotal>
                        <type>detail</type>
                    </flexTableColumn>
                    <flexTableColumn>
                        <reportColumn>Product2.AreaQuintal__c</reportColumn>
                        <showSubTotal>false</showSubTotal>
                        <showTotal>false</showTotal>
                        <type>detail</type>
                    </flexTableColumn>
                    <flexTableColumn>
                        <reportColumn>Product2.TotalVagas__c</reportColumn>
                        <showSubTotal>false</showSubTotal>
                        <showTotal>false</showTotal>
                        <type>detail</type>
                    </flexTableColumn>
                    <flexTableColumn>
                        <reportColumn>Product2.LadoNascente__c</reportColumn>
                        <showSubTotal>false</showSubTotal>
                        <showTotal>false</showTotal>
                        <type>detail</type>
                    </flexTableColumn>
                    <flexTableSortInfo>
                        <sortColumn>Product2.Cidade__c</sortColumn>
                        <sortOrder>1</sortOrder>
                    </flexTableSortInfo>
                    <hideChatterPhotos>true</hideChatterPhotos>
                </flexComponentProperties>
                <groupingSortProperties/>
                <header>Estoque</header>
                <report>VisualizacaoUnidades/Unidades_por_cidade_CSy</report>
            </dashboardComponent>
            <rowIndex>0</rowIndex>
            <rowSpan>11</rowSpan>
        </dashboardGridComponents>
        <numberOfColumns>12</numberOfColumns>
        <rowHeight>36</rowHeight>
    </dashboardGridLayout>
    <dashboardType>SpecifiedUser</dashboardType>
    <isGridLayout>true</isGridLayout>
    <textColor>#000000</textColor>
    <title>Estoque</title>
    <titleColor>#000000</titleColor>
    <titleSize>12</titleSize>
</Dashboard>

Please note that the report referenced is deployed.

4
  • Would you be able to share the exact metadata of the dashboard you are trying to deploy? It seems like this is a required field when using the Metadata API of v41 and greater Commented Jan 13, 2020 at 14:20
  • @BryanAnderson I've updated the question with the metadata. Commented Jan 13, 2020 at 14:29
  • I wonder if all the Product2 custom fields being referenced exist in Production. If not they would need to deployed as well Commented Jan 13, 2020 at 14:35
  • 1
    That was it. Oh well, communication problems. Looks like someone else modified the metadata and didn't deploy the field... thank you. Please answer the question so I can mark it as the solution. Commented Jan 13, 2020 at 14:40

2 Answers 2

1

I wonder if all the Product2 custom fields being referenced exist in Production. If not they would need to deployed as well

0

Workaround from SF support if your changeset contains dashboards with Lightning Table components

  1. Edit dashboard.
  2. Edit EVERY Lightning Table component in the dashboard. For each Lightning Table component, click the pencil icon and click on Update to resave the component.
  3. Attempt to create a changeset, add dashboards, and then try to upload the changeset.

You must log in to answer this question.

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