[SalesForce] Warning: Added entity: My_Custom_Object__c support on queue: MyQueue

I'm using the Salesforce Migration Tool (Ant) to migrate a custom object. I am using the migration tool to pull the custom object down then deploy it. The package.xml is very simply… just trying to deploy one custom object and related queues at this time.

While doing so, I'm getting this error:

All Component Failures:
1.  objects/My_Custom_Object__c.object (My_Custom_Object__c.My_View) -- Warning: Added entity: My_Custom_Object__c support on queue: MyQueue (line 670, column 16)

This problem is similar to the problem powlo had (first part only), which doesn't have an answer.

There are several errors just like this one that is preventing my code from deploying. Anyone know how to solve this?

Best Answer

I had the same issue in a big package...

Removing the Queues from the package proved complicated as there were quite a few references and I was moving from one error to another.

Based on the previous comments, I ended-up deploying in 2 stages:

1) Deploy an "empty shell" made of bare bone objects only:

1.1) Backup the "src" folder into "src-backup"

1.2) Delete all sub-folders in "src" other than "objects"

1.3) Edit package.xml to only keep a single component type = CustomObject

1.4) Edit all "objects/*.object" xml files to only keep the information entered at time of creation of the object. Example below:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <allowInChatterGroups>true</allowInChatterGroups>
    <compactLayoutAssignment>SYSTEM</compactLayoutAssignment>
    <deploymentStatus>Deployed</deploymentStatus>
    <description>MyObject is used to do this and that...</description>
    <enableActivities>true</enableActivities>
    <enableBulkApi>true</enableBulkApi>
    <enableFeeds>true</enableFeeds>
    <enableHistory>true</enableHistory>
    <enableReports>true</enableReports>
    <enableSharing>true</enableSharing>
    <enableStreamingApi>true</enableStreamingApi>
    <externalSharingModel>ReadWrite</externalSharingModel>
    <sharingModel>ReadWrite</sharingModel>
    <nameField>
        <displayFormat>MyObj-{000000000}</displayFormat>
        <label>My Object ID</label>
        <trackFeedHistory>false</trackFeedHistory>
        <trackHistory>false</trackHistory>
        <type>AutoNumber</type>
    </nameField>
    <label>My Object</label>
    <pluralLabel>My Objects</pluralLabel>
    <recordTypeTrackFeedHistory>true</recordTypeTrackFeedHistory>
    <recordTypeTrackHistory>false</recordTypeTrackHistory>
</CustomObject>

2) Re-Deploy the original package

2.1) Delete the "src" folder

2.2) Rename "src-backup" folder to "src"

2.3) Run a Deploy again.

Should be working now!