2

I am having an issue when retrieving a package using the Metadata API. I am trying to retrieve a package that has a flow in it. Here is a sample request:

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:met="http://soap.sforce.com/2006/04/metadata"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soapenv:Header>
        <met:CallOptions>
            <met:client></met:client>
        </met:CallOptions>
        <met:SessionHeader>
            <met:sessionId>**redacted**</met:sessionId>
        </met:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
        <met:retrieve>
            <met:retrieveRequest>
                <met:packageNames>Update Opportunity Partner Field Hierarchy</met:packageNames>
                <met:singlePackage>true</met:singlePackage>
            </met:retrieveRequest>
        </met:retrieve>
    </soapenv:Body>
</soapenv:Envelope>

The resulting zip file only contains a package.xml instead of also including the Flow contained in the package. When I do the same exact operation in Workbench, the zipfile they give back includes the file. Can anyone tell me what I am doing wrong?

2
  • When you say "package", do you mean a managed package or do you mean unpackaged metadata with a package.xml? If you mean a managed package, these are Intellectual Property ("IP") protected so much of the content cannot be accessed.
    – Phil W
    Commented Jan 14, 2023 at 18:36
  • It's all unpackaged. I am using this request to retrieve an outbound change set that users build in the UI Commented Jan 14, 2023 at 18:56

1 Answer 1

4

Figured out the issue thanks to Not able to retrieve Settings through Metadata API

I needed to specify the apiVersion in my retrieveRequest, as it was defaulting to version 12.0 when not included.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .