2

When retrieving Translations the docs say, the returned Metadata

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

Source: Translations | Metadata API Developer Guide

This behavior seems to be true for Sandboxes, Production Orgs and Developer Editions.

However there seems to be another behavior for Scratch Orgs:

We get the full content of the Translations regardless if we

  • request the Translations alone (sfdx force:source:retrieve -m Translations:en_US)
  • or in combination with other Metadata such as CustomLabel (sfdx force:source:retrieve -m Translations:en_US,CustomLabel:VAT_Number).

For Profiles (with CustomFields) the behavior is similar.

I created a minimum reproduction to compare the retrieval from a Scratch Org vs. a Developer Edition: https://github.com/mdapi-issues/retrieve-behavior-scratch-org. Further I've retrieved using a package.xml and the Salesforce Workbench, leading to the same result.

Is this behavior documented somewhere or is there any trick to make it work in Scratch Orgs as documented?

1 Answer 1

1

Found the answer in the Salesforce DX Developer Guide Retrieve and Pull Changes to Profiles with Source Tracking:

Retrieving and pulling profiles behaves a little differently with source tracking.

...

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.

You must log in to answer this question.

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