Skip to content

Minimal working example to demonstrate the Metadata API behaves differently when retrieving Metadata from a Scratch Org vs. other Org

Notifications You must be signed in to change notification settings

mdapi-issues/retrieve-behavior-scratch-org

Repository files navigation

retrieve-behavior-scratch-org

Minimal working example to demonstrate the Metadata API behaves differently when retrieving Metadata from a Scratch Org vs. other Org

Actions Status

Typically, when retrieving Profiles, RecordTypes or Translations from an org, we only get the content for the other metadata types referenced in package.xml.

However if the org (Scratch Org or Sandbox) has Source Tracking enabled, we are getting the full content.

With source tracking, retrieving profiles returns profile information pertaining to anything else specified in the package.xml file plus any components getting tracked by source tracking. That includes any entity for which a change exists between your local project and the org.

Source: Salesforce DX Developer Guide Retrieve and Pull Changes to Profiles with Source Tracking

Profiles

... the returned .profile files only include security settings for the other metadata types referenced in the retrieve request. Exceptions include user permissions, IP address ranges, and login hours, which are always retrieved.

see docs for Profiles

RecordTypes

The RecordType only contains the <picklistValues> for the CustomFields requested in the same retrieval.

Translations

... the files returned in the .translations folder only include translations for the other metadata types referenced in package.xml.

see docs for Translations

Reproduction

This repo contains a test suite to reproduce

  • the default behavior for a Developer Edition
  • the different behavior for a Scratch Org

About

Minimal working example to demonstrate the Metadata API behaves differently when retrieving Metadata from a Scratch Org vs. other Org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •