Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I just deployed code using the Migration Tool, including a new Public Group and some other objects (report folder, list view, etc.) that were shared out to that group:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

    <types>
        <members>My_New_Team</members>
        <name>Group</name>
    </types>

    <!-- Other objects -->

    <version>26.0</version>
</Package>

My build failed, and I kept getting an error that the group couldn't be found, causing the other object deployments to fail. Eventually I added the group first (in a separate deployment), and then re-deployed and the migration succeeded.

My question is: Why did this happen, and is there anything I can do to help the migration tool correctly resolve dependencies so that it deploys the group first?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Based on my experimentation and testing, the migration tool inserts objects in the order they're listed in package.xml. If you have dependencies within your project, be sure to list them in order!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.