All Collections
Help Articles
Find & Replace in deployment.
Find & Replace in deployment.

How to create a Find & Replace rule

S
Written by Shreya Reddy Kommidi
Updated over a week ago

This guide aims to assist your team in effectively preparing Find and Replace rule when you run a deployment in Copado Essentials.

  • Start by downloading the metadata package from the Source Org.

  • If the deployment has a Find And Replace rule, Essentials will find any metadata files in the deployment package what matches the "file_filters" in the rule. Then apply the "replace_rules" to this files.

  • Finally, deploy the updated package to the Target Org.

Below are the steps to prepare for a Find And Replace Rule:

First go to the deployment, click on More > Retrieve Package for Download, then download the deployment package.

After that, look at the package to see which metadata file you want to apply the rule. For example in a deployment below there is a flow named "Variables". In the deployment package, the metadata file name is "Variables.flow".

If you want to replace all the dev email to prod email in this flow, we can prepare a rule below:

---

rule_replace_outbound_user_email:

file_filters:

- 'Variables.workflow'

replace_rules:

Then go to the "Deploy Option" tab and save the rule. Then download the deployment package again and check if the rule is applied correctly to the metadata file.

Notes:

Hope this help your team to prepare the rule.

Did this answer your question?