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:
- Create a scratch org.
- Go into the Setup UI and enable Enterprise Territory Management (default settings are fine).
- Deploy the types first using
sfdx force:source:deploy -m Territory2Type. That should be successful.
- 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.
I have a project that includes
Territory2/Model/Rule/Typemetadata. 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--Territory2Modeland its child metadata types no longer deploy or retrieve successfully (Territory2Typeseems 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:
sfdx force:source:deploy -m Territory2Type. That should be successful.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:pushcan actually deploy these to the scratch org, so do that to get the scratch org populated, then you can try to retrieve them usingsfdx force:source:retrieve -m Territory2Model,sfdx force:source:retrieve -p force-app/main/default/territory2Models/SCW_Territory_Model/SCW_Territory_Model.territory2Model-meta.xmlwhich will result inNo results found, orsfdx force:source:retrieve -x manifest/package.xmlwhich will only retrieve theTerritory2Typemetadata.