Metadata Api fails with "No such relationship Activities on object Contact" error when deploying to overwrite custom report types
Last updated 7 days ago ·Reference W-7226143 ·Reported By 12 users
In Review
Summary
When trying to update the Custom Report Types using Metadata API using ANT or SFDX, there's an error : No such relationship Activities on object Contact
Repro
1. Go to Setup > Activity Setting: .../lightning/setup/HomeActivitiesSetupPage/home
Activate the setting "Allow Users to Relate Multiple Contacts to Tasks and Events"
2. Create a new custom report type
(1) Setup > Report Types : .../lightning/setup/CustomReportTypes/home
(2) Click New Custom Report Type
(3) Input as follow and click Next
- Primary Object : Contacts
- Report Type Label : Contact Event Custom Report Type
- Report Type Name : Contact_Event_Custom_Report_Type
- Description : Contact Event Custom Report Type
- Store in Category : Other Reports
- Deployed : Checked
(4) Click Next
(5) Click "(Click to relate another object)"
(6) For "--Select Object--", select "Activities"
(7) Click Save
3. Create package.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Contact_Event_Custom_Report_Type</members>
<name>ReportType</name>
</types>
<version>49.0</version>
</Package>
4. Retrieve using tool like workbench or thru SFDX
Retrieve metadata using package.xml via Workbench (Migration > Retrieve )
sfdx force:source:pull
5. Unzip *.zip file and confirm the metadata file "Contact_Event_Custom_Report_Type.reportType" exists.
6. Change the description tag from "Contact Event Custom Report Type" to "Contact Event Custom Report Type Updated"
7. Generate a zip file, Deploy metadata API using the zip file via Workbench (migration > Deploy), select zip file. next-> deploy.
With SFDX :
sfdx force:source:push -u <username>
Actual Result :
No such relationship Activities on object Contact
Workaround
None
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.
