I am trying my hand at building a package.xml dynamically to download everything from an salesforce org, so I started the Novel approach of getting the describeMetadata and iterating through it to build my retrieve request! But soon discovered this would miss out on certain elements, one was, the EmailTemplate folders. (found a solution for that by firing a query to the Folder object filter by Type = Email, as even though the documentation say's if you retrieve a listMetadata on 'EmailTemplates', it returns the list of folders like reports, but it only returns a null )
I thought this was a one off, but .... ran into another one right now, that there is no element representing 'PageLayouts' in the describeMetadata Response .. what am I missing here ?
I am sure I am missing something obvious here, as there has to be a solutions for all the elements which I can get from eclipse while downloading a project but don't show up in describeMetadata for the org ?
for the retrieve of PageLayouts I have tried the following arguments.
type: 'Layout',
folder: 'layouts'
Didn't work!
UPDATE : 23/09/2014
Answer,
I was able to resolve this particular problem by using type = 'Layout' and leaving folder 'blank', which returns all the layouts for all the objects.