• pklocke
  • 0 Points
  • Member since 2013

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1

I have been working on a script that automates pulling down my org's data/metadata into a subversion repository nightly.  I have completed the main objective utilizing Ant & the Force.com Migration Tool but have noticed in my tweaking that the package manifest file (package.xml) is not dynamic enough for my purposes.


I know from reading the Force.com Migration Tool Guide (http://www.salesforce.com/us/developer/docs/daas/salesforce_migration_guide.pdf)

that certain components cannot utilize the wildcard feature such as dashboards, documents, email templates, letterheads, and reports.  Likewise, I know that there are still several other components that you must first dot-qualify their object name as they are sub-components.


My question is as follows: is there a way to possibly create a dynamic package manifest file so that if a user were to create a new document or email template then such a change would be automatically detected during that night's backup and the corresponding change/file would be uploaded to my subversion repository?


Again, my initial glance at the Force.com Migration Tool Guide makes me think this is not possible and that a manual edit to the package.xml file would be necessary-but my optimism stems from drawing parallels between my desired task and the current functionality of the Force.com IDE tool.  Upon initially setting up a new Force.com project in the Eclipse IDE you are able to manually select which metadata components you would like included-as noted by JonP this is essentially a GUI for creating your package.xml file.  For existing projects, you have the option of later adding additional components that were either not originally included in your project or were created over the web interface after you set up your Eclipse project (exactly the scenario that affects my desired task) by utilizing the Add/Remove metadata components tool and then clicking the "Refresh from Server" button (depicted by circular arrows).  This refresh from server button proves there is a way to somehow poll your org and discover new metadata components not currently included in your package.xml file and if I could find a way to automate this process via the command line (and then have the differences updated in my existing package.xml) then I could create a dynamic package manifest file as I desire


This problem also exists in the inverted scenario where a user deletes certain components via the web interface that should then be replicated in the subversion repository (I must admit though that this issue does not concern me as much as allowing for new components to be brought in does).