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.

Does the order of the package.xml file matter? For instance:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <types>
        <members>Account</members>
        <members>AccountContactRole</members>
        <members>Activity</members>
        <members>Asset</members>
        <members>Campaign</members>
        <members>CampaignMember</members>
        <members>Case</members>
        <members>CaseContactRole</members>
        <members>Contact</members>
        <members>ContentVersion</members>
        <members>Contract</members>
        <members>ContractContactRole</members>
        <members>Event</members>
        <members>Idea</members>             
        <members>Lead</members>
        <members>Opportunity</members>
        <members>OpportunityContactRole</members>
        <members>OpportunityLineItem</members>
        <members>PartnerRole</members>
        <members>Product2</members>
        <members>Site</members>
        <members>Solution</members>
        <members>Task</members>
        <members>User</members>
        <members>UserLicense</members>
        <members>*</members>
        <name>CustomObject</name>
    </types>
    <version>26.0</version>
</Package>

Would this cause issues if the Apex Classes, Components, Visualforce page, or Apex Triggers were dependent on some of the objects being in place? Would this work better with a setup like:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types>
        <members>Account</members>
        <members>AccountContactRole</members>
        <members>Activity</members>
        <members>Asset</members>
        <members>Campaign</members>
        <members>CampaignMember</members>
        <members>Case</members>
        <members>CaseContactRole</members>
        <members>Contact</members>
        <members>ContentVersion</members>
        <members>Contract</members>
        <members>ContractContactRole</members>
        <members>Event</members>
        <members>Idea</members>             
        <members>Lead</members>
        <members>Opportunity</members>
        <members>OpportunityContactRole</members>
        <members>OpportunityLineItem</members>
        <members>PartnerRole</members>
        <members>Product2</members>
        <members>Site</members>
        <members>Solution</members>
        <members>Task</members>
        <members>User</members>
        <members>UserLicense</members>
        <members>*</members>
        <name>CustomObject</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexComponent</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexPage</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>
    <version>26.0</version>
</Package>

I would assume the order doesn't matter, but I am just looking for someone to verify that assumption.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

I've never seen it make a difference. There are a lot of dependencies, anyway, Visualforce w/ Apex, Apex w/ Custom Objects, etc. Just as long as those dependencies are referenced in the package.

share|improve this answer
    
+1 for this, been using it for years in many different setups over hundreds of different package.xml's. Never seen order matter, within or across types. If order ever did matter, it would almost certainly be a bug. –  jkraybill Feb 5 '13 at 1:37

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.