23

I'm trying to pull down the current source for a sandbox org I've just connected to. General steps were:

  1. Connect to the org.
    sfdx force:auth:web:login -r https://test.salesforce.com -a someOrg
  2. Create the project
    sfdx force:project:create -n thatSandbox
  3. Switch into new project directory
  4. Attempt to pull down the current org source
    sfdx force:source:pull -u someOrg

On the last step it fails with:

ERROR running force:source:pull:
MemberName, IsNameObsolete FROM SourceMember WHERE RevisionNum >
^
ERROR at Row:1:Column:52
sObject type 'SourceMember' is not supported. If you are attempting to use a
custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

The sandbox is CS17, which is currently on Winter '18 Patch 4.4 (210.4.4).

Can I only do a source pull from a Scratch Org? If so, I guess I'd need to do a metadata retrieve from the sandbox and then convert to the Salesforce DX project format.

For what it's worth, SourceMember (0MZ keyprefix) was added in beta in the Summer '17 release to the Tooling API:

Represents a single sObject of all source that you are tracking in a scratch org

1 Answer 1

17

You are correct that you can only do a source pull from a Scratch Org. You can retrieve the source from a managed or unmanaged package. Just put everything you want to retrieve into an unmanaged package and then follow these steps

You must log in to answer this question.

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