diff --git a/force-meta-backup.groovy b/force-meta-backup.groovy index d3c8800..df4bb70 100755 --- a/force-meta-backup.groovy +++ b/force-meta-backup.groovy @@ -592,7 +592,9 @@ class Folders extends ManifestBuilder { } private fetchAllFolders() { - def soql = "SELECT NamespacePrefix, DeveloperName, Type FROM Folder WHERE DeveloperName != '' ORDER BY Type, NamespacePrefix, DeveloperName" + def folderTypes = folderMetaTypeByFolderType.keySet() + + def soql = "SELECT NamespacePrefix, DeveloperName, Type FROM Folder WHERE DeveloperName != '' AND Type IN ('${folderTypes.join("', '")}') ORDER BY Type, NamespacePrefix, DeveloperName" def sObjects = forceService.query soql def folders = [:]