In using the metadata API to delete validation rules today, I ran into the issue described in this post, where i needed to set deployOptions.singlePackage
to true, in order for the rules to get deleted.
I understand that this setting indicates the structure of the zip file, as per the docs on the deploy method.
Indicates whether the specified .zip file points to a directory structure with a single package (true) or a set of packages (false).
However, it seems like all of the samples in the documentation use the structure where singlePackage
= true. I have not been able to find an example of deploying with singlePackage
= false.
Given that the default value (at least in workbench) is false, I would like to understand what file structure is expected in order to successfully deploy using singlePackage
= false.
Best Answer
I thought I'd try this, but in reverse.
Using my new found knowledge that you can pull a changeset with the Metadata API I used two random unmanaged packages as samples for a retrieve operation via Workbench.
Note that SinglePackage is unchecked and both changeset names are defined.
After Retrieve:
The fileProperties above do a pretty good job of indicating the zip structure. At the top level are folders with each of the unmanaged package names.
For fun I:
Workbench multiple packages:
Deploy result:
The unmanaged package descriptions were updated with my "- Updated" suffix.
Do keep and eye on Salesforce DX and the packaging 2.0 changes. I wouldn't be surprised to see more utilization or changes in this area going forward.