5

I am using ant target from the migration tool to retrieve all the medata from one of my sandboxes. In the list of metadata retrieved I don't have dashboard, email, reports, all is empty. But when I use the eclipse plugin and sync with server all this metadata appears. Can someone explain me why I have this difference ?

Thanks for your help.

  • What does your package.xml look like? – Rob Sep 13 '15 at 12:10
  • My package.xml is huge but there is not entries for dashboards. The problem is when I call sf:listMetadata, it doesn't return any dashboards when I specify metadataType=Dashboard ? – Sébastien Van Cutsem Sep 14 '15 at 9:22
2

For these metadata types, you can't simply retrieve all of them with the * notation. To retrieve them, you need to request them specifically by name and include the folder that they are in.

When the eclipse plugin generates the package.xml file, it is doing that work for you behind the scenes.

A good reference to consult when working with metadata is the Metadata API Developers' Guide


When calling describeMetadata(), you will notice that certain metadataObjects are being returned with the value of inFolder set to true. These objects have another object that is not returned from the describeMetadata() call that are named with the word "Folder" at the end (DashboardFolder, ReportFolder, etc.). To get the metadata for these types, you should use the +Folder object names in the listMetadata() call.

  • 1
    I don't use the * notation. Actually my job work like this : 1. Call sf:describeMetadata - to get all kind of metadata 2. Call for each metaData sf:listMetadata - but here for dashboards I have nothing and that's my problem 3. Create a package.xml with each elements coming from the listMedata job So to be more specific my question is : Why sf:listMetadata doesn't return any dashboards when I specify metadataType=Dashboard ? – Sébastien Van Cutsem Sep 14 '15 at 9:19
  • @SébastienVanCutsem So, in the case of Dashboards, you would want to specify metadataType=DashboardFolder when running sf:listMetadata. – martin Sep 14 '15 at 10:07
  • Thanks for your answer but I have still one question. I have a metadata descitpion which says : XMLName: EmailTemplate DirName: email Suffix: email HasMetaFile: true InFolder: true ChildObjects: So I tried sf:listMetadata with metadataType=EmailTemplateFolder but that says INVALID_TYPE: Unknown type:EmailTemplateFolder. So it's not a general rule to say each time I have InFolder=true I can add Folder to the XMLName ?? – Sébastien Van Cutsem Sep 14 '15 at 15:32
  • @SébastienVanCutsem Interesting. It looks like EmailTemplate is an exception to the rule. – martin Sep 15 '15 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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