Hello Trailblazers!!
Prerequisite: JDK, VS Code installed with Salesforce Extension Pack,
Salesforce CLI. Follow the instructions to set up.
Assume that you need to deploy the Advanced Territory Management changes from Sandbox to Production. You can also use these steps to deploy from one sandbox to another.
Follow the below steps.
- First, create the VS code project for Sandbox.
-
Open VS code, create a new project, Ctrl/⌘ -> Shift ->P,
type "Create Project with Manifest".
- Select the folder to save the project.
-
Now authorize the source org, using Authorise an Org command.
-
Now we need to retrieve the territory changes from the source org. Before
that add the below code in your
package.xml file.
<types> <members>*</members> <name>Territory2Model</name> </types> <types> <members>*</members> <name>Territory2</name> </types> <types> <members>*</members> <name>Territory2Rule</name> </types> <types> <members>*</members> <name>Territory2Type</name> </types>
-
Right-click the manifest file and select "Retrieve Source in Manifest From Org". wait till the changes are retrieved. After successful retrieve, you will see below folders in your project.
- Create a new VS code project for the destination Production (sandbox if needed). Follow steps 1 through 4 to create a new project. Ignore if you already have one.
-
Now copy the folders and all theirs contents "territory2Models",
"territory2Types".
-
Paste the copied folders into the destination project's
"default" folder.
- Now its time to deploy. Please note that you need to deploy the "territory2Types" folder first. So right-click that folder and select "Deploy Source to org".
- Next, deploy the "territory2Models" folder.
Now check in the destination org you should have the changes. Let me know if you face any issues.
No comments :
Post a Comment
Hi there, comments on this site are moderated, you might need to wait until your comment is published. Spam and promotions will be deleted. Sorry for the inconvenience but we have moderated the comments for the safety of this website users. If you have any concern, or if you are not able to comment for some reason, email us at rahul@forcetrails.com