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.

  • 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 – Bryan Anderson Jan 13 at 14:20
  • @BryanAnderson I've updated the question with the metadata. – Renato Oliveira Jan 13 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 – Bryan Anderson Jan 13 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. – Renato Oliveira Jan 13 at 14:40
1

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

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.