Code Replication

Code replication transfers code versions from staging to a development or production instance and activates them.

(To move code from a sandbox to staging, use code deployment.)

When you replicate a code version, the version on the target instance is assigned the same name as the source version on staging. If the name already exists, then a timestamp and index number are appended to the name. For example, if you replicate a code version named "version1" and a version of that name already exists on the target instance, then the new version is named something like "version1_05032018-1".

Code Replication Process Types

Code replication is a two-step process. First, a code version is transferred from staging to the target instance, then it is activated on the target instance. You can run both steps as a single replication process, or run them separately. Running them separately can help you identify the source of failures that might occur.

There are four types of code replication processes.

Note: You run all replication processes on the staging instance, even Code Activation and Undo, which only affect the target instance.
Replication Type Description
Code Transfer The selected code version on the source instance is transferred to the target instance, but is not made active. The current active version on the target remains active. You must then run a replication process of type Code Activation to make the replicated version active on the target instance.
Code Transfer & Activation The selected code version on the source instance is transferred to the target instance and is immediately made the active version on the target.
Code Activation This process is available only after a successful Code Transfer process. Activation makes the transferred code version the active version on the target instance. If it is already active, then nothing happens. If it no longer exists on the target instance, then the replication process fails.
Undo This process is available only after a successful Code Transfer & Activation or Code Activation replication process. It reverts the active code version on the target instance to the version that was active before the prior code replication process. If the version to be reverted is no longer active, then nothing happens. If it no longer exists on the target instance, or if the previously active code version no longer exists, then the replication process fails.

Related Links

Replication

Create a Code Replication Process

Replication Best Practices

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. By continuing to use this site you are giving us your consent to do this.