Skip to content

Regression: Territory2Model metadata no longer deploys/retrieves via the CLI's force:source:deploy/retrieve actions #1147

@SCWells72

Description

@SCWells72

I have a project that includes Territory2/Model/Rule/Type metadata. Things have been working fine with that metadata since it was introduced in March, 2020. However, in recent CLI builds--at least 7.114.0 and the prior build--Territory2Model and its child metadata types no longer deploy or retrieve successfully (Territory2Type seems fine).

Deployment fails with Unable to derive the fully qualified name for component at location territory2Models/MyTerritoryModel.territory2Model. Retrieval doesn't issue warnings or errors but also doesn't include the requested metadata in its retrieval payload.

I'll attach with a project containing some sample territory types and one sample territory model. To reproduce this:

  1. Create a scratch org.
  2. Go into the Setup UI and enable Enterprise Territory Management (default settings are fine).
  3. Deploy the types first using sfdx force:source:deploy -m Territory2Type. That should be successful.
  4. Try to deploy the model using sfdx force:source:deploy -m Territory2Model. You should see the same error that I'm seeing, Error SCW_Territory_Model Unable to derive the fully qualified name for component at location territory2Models/SCW_Territory_Model.territory2Model.. Note that I've also tried to deploy using -p force-app/main/default/territory2Models/SCW_Territory_Model/SCW_Territory_Model.territory2Model-meta.xml, and -x manifest/package.xml, and they all fail in some similar manner.

Note that force:source:push can actually deploy these to the scratch org, so do that to get the scratch org populated, then you can try to retrieve them using sfdx force:source:retrieve -m Territory2Model, sfdx force:source:retrieve -p force-app/main/default/territory2Models/SCW_Territory_Model/SCW_Territory_Model.territory2Model-meta.xml which will result in No results found, or sfdx force:source:retrieve -x manifest/package.xml which will only retrieve the Territory2Type metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue or pull request that identifies or fixes a buginvestigatingWe're actively investigating this issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions