Closed VivekMChawla closed 5 years ago
According to the TM1 to TM2 Migration Guide in Quip, the sharing rules should be updated such that every instance where a Territory Name is used, it is prepended by the model name, eg. ModelName.Territory_Name
Also, TM2 does not use "Account Territory" sharing rules (ie. the sharingTerritoryRules
keys from the earlier TM1 sharing rules metadata example. These should be removed from any updated metadata.
Using the example from above, the territory values should be updated like this:
<?xml version="1.0" encoding="UTF-8"?>
<SharingRules xmlns="http://soap.sforce.com/2006/04/metadata">
<sharingOwnerRules>
<fullName>MM</fullName>
<accessLevel>Edit</accessLevel>
<accountSettings>
<caseAccessLevel>None</caseAccessLevel>
<contactAccessLevel>Edit</contactAccessLevel>
<opportunityAccessLevel>None</opportunityAccessLevel>
</accountSettings>
<label>MM</label>
<sharedTo>
<territory>Imported_Territory.MMC01NEast</territory>
</sharedTo>
<sharedFrom>
<territoryAndSubordinates>Imported_Territory.District1100</territoryAndSubordinates>
</sharedFrom>
</sharingOwnerRules>
</SharingRules>
I don't think we need to delete the "Account Territory" rules from the org. Those may disappear once the switch from TM1 to TM2 is flipped, but we should confirm with the product team.
The Original Territory Management (TM1) to Enterprise Territory Management (ETM/TM2) Migration FAQ document states the following:
Export any sharing rules involving territories (if any), and then delete these sharing rules involving territories.
Delete all the sharing rules where Group Type is "Territory" OR "TerritoryAndSubordinates" in GroupId and UserOrGroupId fields on Sharing object
IMPORTANT: Please make sure that you delete any sharing rules involving territory groups before TM1 is disabled.
This means we should add a feature to create a "destructive changes" deployment for the old rules.
This feature has been delivered as part of the 1.0.0 release.
There are a number of Sharing Rules on Account (Criteria, Owner, and Territory) that may need some sort of transformation.
Here's what some of this metadata looks like in TM1 (
Account.sharingRules
):We need to know how this would look like in TM2 to determine the correct transformation logic