6

I am trying to deploy Reports and Dashboards via Ant tool.

I get this error for Report Type

  1. reports/JMT_Reports/Expiry_and_Renewal_Status.report -- Error: Invalid field name: Lease_Unit__c$Lease_End_Date_formula__c
  2. reports/Junction_Reports/This_Month_Outstanding_Invoices.report -- Error: duplicate value found: < unknown> duplicates value on record with id: < unknown>

For 1. I checked on object Lease_Unit__c there is field present Lease_End_Date_formula__c

for 2. This_Month_Outstanding_Invoices-
This is Matrix Report xml looks like this

<?xml version="1.0" encoding="UTF-8"?>
<Report xmlns="http://soap.sforce.com/2006/04/metadata">
    <columns>
        <field>CUST_OWNER_NAME</field>
    </columns>
    <columns>
        <field>CUST_NAME</field>
    </columns>
    <columns>
        <field>Invoice__c.Amount__c</field>
    </columns>
    <columns>
        <field>Invoice__c.Amount_Paid__c</field>
    </columns>
    <columns>
        <field>Invoice__c.Billing_Type__c</field>
    </columns>
    <columns>
        <aggregateTypes>Sum</aggregateTypes>
        <field>Invoice__c.Outstanding_Amount__c</field>
    </columns>
    <columns>
        <field>Invoice__c.Invoice_Date__c</field>
    </columns>
    <filter>
        <criteriaItems>
            <column>Invoice__c.Outstanding_Amount__c</column>
            <isUnlocked>true</isUnlocked>
            <operator>notEqual</operator>
            <value>0</value>
        </criteriaItems>
        <criteriaItems>
            <column>Invoice__c.Voided__c</column>
            <isUnlocked>true</isUnlocked>
            <operator>notEqual</operator>
            <value>1</value>
        </criteriaItems>
    </filter>
    <format>Matrix</format>
    <groupingsAcross>
        <dateGranularity>Day</dateGranularity>
        <field>Invoice__c.Payment_Due_Date__c</field>
        <sortOrder>Asc</sortOrder>
    </groupingsAcross>
    <groupingsDown>
        <dateGranularity>Day</dateGranularity>
        <field>Invoice__c.Account__c</field>
        <sortOrder>Asc</sortOrder>
    </groupingsDown>
    <name>This Month Outstanding Invoices</name>
    <params>
        <name>co</name>
        <value>1</value>
    </params>
    <reportType>CustomEntity$Invoice__c</reportType>
    <scope>organization</scope>
    <showDetails>true</showDetails>
    <timeFrameFilter>
        <dateColumn>Invoice__c.Invoice_Date__c</dateColumn>
        <endDate>2017-03-31</endDate>
        <interval>INTERVAL_CUSTOM</interval>
        <startDate>2017-01-01</startDate>
    </timeFrameFilter>
</Report>
3
  • have you checked this Lease_End_Date_formula__c field on your target org.? Commented May 3, 2017 at 11:54
  • Yes it is there Commented May 3, 2017 at 12:01
  • For 2 - Have you checked that you have not set the "track field history" for this field in object?
    – Adamo
    Commented May 7, 2017 at 12:00

2 Answers 2

5

Little late for the person who asked, but I just had to solve this issue the problem is if you don't bring the updated ReportType along with the new reports. It seems to throw this error.

You can include the ReportType in package.xml like this:

<types>
    <members>ReportType_API_Name</members>
    <name>ReportType</name>
</types>
1

If the field is not in the report type, it will throw this error too.

You must log in to answer this question.

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