Open boxfoot opened 11 years ago
Aren't Reports records? You'd probably be better off using Restforce
Reports (and Documents, EmailTemplates) are both records and metadata. I'm writing a utility to generate package.xml files, which means using metadata API to query for data types. Most types allow subscription with
I don't have a solution, but maybe this is useful.
I also want an easy way to pull down all Folder-based metadata
Here are some blog posts that detail some strategies: http://www.pocketsoap.com/weblog/2008/10/1826.html http://wiki.developerforce.com/page/Syncing_Salesforce_Org_Metadata_to_Github
To pull the actual metadata files locally, I should be able to do something like this:
manifest = Metaforce::Manifest.new({:document => ['MyFolder', 'MyFolder/MyDocument']})
client.retrieve_unpackaged(manifest).extract_to('./tmp').perform
We can't use '*', so we have to be specific with our metadata request. So, we still need to get a list of an org's folders, and all items in these folders. This SOQL query should get the folder names:
SELECT Id, Name, DeveloperName, Type, NamespacePrefix, AccessType
FROM Folder
ORDER BY Name DESC
Then to get the items in these folders, we have to query data records for folder-based metadata, which is Reports, Documents, Dashboards, and EmailTemplates:
SELECT Id, Name, DeveloperName, IsDeleted, NamespacePrefix
FROM Report
ORDER BY Name DESC
I don't have good base knowledge in this area, so I don't know what the problem is. A problem with my org's security settings for my folder-based metadata? A problem with Metaforce? A problem with the Metadata API?
I'm trying to get a list of reports, and can't figure out how. The basic call should be something like:
but I can't figure out how to add in the parameter for report folder. Is this supported?
Related: listMetadata allows submitting up to three ListMetaDataQuery queries with each call. Is there a way to do that with metaforce?