Rehearsal Tool

Delphix Rehearsal tool (dxrt) is the command line interface built by Delphix to test (rehearse) the process of Salesforce metadata package deployment to a Salesforce Org.

Purpose

When masking data in Salesforce tables, it is recommended to keep the metadata packages on these tables in a disabled state so that masking can run without any interference.

The Delphix Rehearsal tool (dxrt) can disable Salesforce components such as triggers, workflows, process builders etc., prior to masking the sandbox. After masking the data, the Rehearsal Tool can be used to restore the sandbox's components to their original state. This can be achieved using the enable feature.

The Rehearsal Tool also provides a quick and effective alternative for testing (rehearse) the metadata package deployment process to identify any issues before starting the data masking process.

dxrt Operations

The Delphix Rehearsal Tool supports the following three operations:

Disable

During the disable operation, dxrt disables the active Salesforce metadata components in the target Salesforce Org. Disable can be run for all tables in the org or for specific tables.

Usage

dxrt disable operation can be used to disable one or more metadata component types ( Triggers, Validation Rules, etc ). This operation can be run for all tables in the Salesforce Org or a specific set of tables. The disable operation downloads a zip file which refers to the pre-disabled state of the Salesforce metadata which can be used during enable to get the components to their pre-disabled state.

Enable

During the enable operation, dxrt deploys a metadata package zip file that is passed as input by the user. At this stage, dxrt does not perform any explicit enabling of components here as it is assumed that the provided input zip file contains the desired state for the components that are being deployed.

Usage

If the masking job fails for any reason, the metadata components will remain in a disabled state. In this situation, the dxrt enable operation can be used to restore the metadata packages to their original state. The enable operation will deploy a metadata package zip file that is provided as input. The input zip file must reflect the desired state of the metadata packages.

To obtain the package zip file:

  • If dxrt rehearse was run for the tables that are being masked before data masking, the original metadata package zip will be available under the current working directory of dxrt. Running dxrt enable with this zip as input will restore the metadata components to their original state.

  • If dxrt rehearse was not run before masking then the original metadata package zip must be obtained from the Delphix Masking engine. Retrieving this file will require assistance from the Delphix Support team. Once the metadata package zip file is retrieved, running dxrt enable with this zip as input will restore the metadata components to their original state.

Rehearse

During the rehearse operation, dxrt performs a test of the metadata package deployment to the target Salesforce Org. This test can be done for all tables in Salesforce or for specific tables.

Any errors encountered during the rehearse process must be resolved with the help of a Salesforce Admin before commencing data masking.

Best Practice

Delphix recommends that users run the dxrt rehearse on the Salesforce tables to reduce the probability of errors during data masking.

Usage

dxrt rehearse operation is used to preemptively test (rehearse) the metadata package deployment process for one or more Salesforce metadata component types such as triggers, validation rules, etc. This operation can be run for all tables in the Salesforce Org or a specific set of tables.

Supported Metadata Package Types

dxrt supports the following metadata packages.

  • Triggers

  • Workflows

  • Process Builders

  • Validation Rules

  • Feeds

  • Field History

  • DuplicateRules

  • Picklist

  • GlobalPicklist

  • Unique

  • MatchingRule

  • Required

  • LookupFilter

The behavior of the above metadata component for dxrt disable/enable operations are as follows:

Component

DXRT Disable

DXRT Enable

Trigger

A trigger is Apex code that executes before or after specific data manipulation language (DML) events occur, such as before object records are inserted into the database, or after records have been deleted. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_triggers.htm?q=Triggers

deactivates the active triggers by setting the status tag to inactive under the “triggers” directory.

restores the triggers to their old state by setting the status tag to active using the retrieve zip.

Workflows

A workflow rule sets workflow actions into motion when its designated conditions are met. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_workflow.htm?q=Workflows

disables the active workflows by setting the active tag to false under the “workflows” directory.

restores the workflows to their old state by setting the active tag to true using the retrieve zip.

Process Builders

Many of the tasks you assign, the emails you send, and other record updates are vital parts of your standard processes. Instead of doing this repetitive work manually, you can configure flows or processes to do it automatically.

https://help.salesforce.com/s/articleView?id=sf.process_overview.htm&type=5

disables the active process builders by setting the activeVersionNumber tag to 0 under the “flowDefinitions” directory.

restores the process builders to their old state by setting the activeVersionNumber tag to 1 using the retrieve zip.

Validation Rules

A validation rule contains a formula or expression that evaluates the data in one or more fields and returns a value of true or false. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_validationformulas.htm?q=Validation%20Rules

disables the active validation rules by setting the active tag to false under the “objects” directory.

restores the validation rules to their old state by setting the active tag to true using the retrieve zip.

Feeds

Feed tracking detects changes to tracked record fields and posts them as updates in the What I Follow feed. Users who follow a record, see those updates in their view of What I Follow, with one exception. Updates users make themselves aren’t posted to What I Follow. Users can see those updates in their profile feeds. https://help.salesforce.com/s/articleView?id=sf.collab_feed_tracking_overview.htm&type=5

disables the active feeds by setting the trackFeedHistory tag to false under the “objects” directory.

restores the feeds to their old state by setting the trackFeedHistory tag to true using the retrieve zip.

Field History

Field history retention policies are defined as part of a standard or custom object. You can set field history retention policies for objects individually. You can select certain fields to track and display the field history in the History related list of an object.

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_historyretentionpolicy.htm?q=Field%20History

https://help.salesforce.com/s/articleView?id=sf.tracking_field_history.htm&type=5

disables the active field history by setting the trackHistory tag to false under the “objects” directory.

restores the field history to its old state by setting the trackHistory tag to true using the retrieve zip.

DuplicateRules

Represents a rule that specifies how duplicate records in an object are detected. A duplicate rule defines what happens when a user views a record with duplicates or starts creating a duplicate record. Salesforce provides standard duplicate rules for business and person accounts, contacts, and leads. You can also create duplicate rules.

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_duplicaterule.htm

https://help.salesforce.com/s/articleView?id=sf.duplicate_rules_map_of_reference.htm&type=5

disables the active duplicate rules by setting the isActive tag to false under the “duplicateRules” directory. duplicate rules are separately disabled first, and then all other metadata components are disabled since there is a dependency between matching rules and duplicate rules.

restores the duplicate rules to their old state by setting the isActive tag to true using the retrieve zip.

Picklist

Picklists represent a predefined list of values for users to choose from when inputting data into a field.

https://developer.salesforce.com/docs/atlas.en-us.salesforce_pubs_style_guide.meta/salesforce_pubs_style_guide/style_picklists.htm

unrestricts the picklist by setting the restricted tag to false under the “objects” directory. By doing this, the fields that use this picklist will not be restricted to only containing the values within the picklist.

restores the picklists to their old state by setting the restricted tag to true using the retrieve zip.

GlobalPicklist

Represents a global picklist or the set of shared picklist values that custom picklist fields can use. In contrast, the custom picklist fields that are based on a global picklist are of the type CustomValue.

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_globalpicklist.htm

since global picklists cannot be unrestricted. dxrt instead activates the deactivated values inside the global picklists. This way, the fields using this global picklist are not restricted to only use the active values of the global picklist. The activation of picklist values are done by setting the isActive tag to true under the globalValueSets directory.

restores the global picklists to their old state by setting the isActive tag to false using the retrieve zip.

Unique

In the user interface, you can specify that a custom field on a custom object contains unique values across all the records of that custom object type. The uniqueness can be either case-sensitive or case-insensitive.

https://help.salesforce.com/s/articleView?id=sf.custom_field_attributes.htm&type=5

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/custom_fields.htm

disables the uniqueness of the fields by setting the unique tag to false under the “objects” directory. It skips disabling unique fields that are used as an indirect lookup on external objects.

restores the fields to their old state by setting the unique tag to true using the retrieve zip.

MatchingRule

Represents a matching rule that is used to identify duplicate records. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_matchingrule.htm?q=MatchingRule

disables the active matching rules by setting the ruleStatus tag to Inactive under the “matchingRules” directory.

restores the matching rules to their old state by setting the ruleStatus tag to Active using the retrieve zip.

Required

Required fields must have a non-null value. This rule affects the creation and update calls:

https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/required_fields.htm

disables the active required fields by setting the required tag to false under the “objects” directory.

restores the fields to their old state by setting the required tag to true using the retrieve zip.

LookupFilter

Represents a lookup filter, which restricts the valid values and lookup dialog results for lookup, master-detail, and hierarchical relationship fields.

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_lookupfilter.htm

disables the active lookup filters by setting the lookupFilter active tag to false under the “objects” directory. the lookup filters for the current object are shown in the “Related Lookup Filter” page of the related objects with the source object listed as the current object.

restores the lookup filters to their old state by setting the lookupFilter active tag to true using the retrieve zip.

Unsupported Types

dxrt can only disable/enable components that the user account has permissions to manage.

In a Salesforce Org, some metadata components cannot be disabled/enabled by the end users.

These could either be owned by Salesforce or by the Author (Salesforce Partner) of the AppExchange apps that they are part of.

Collectively, they are termed as “managed” metadata packages, and only Salesforce or the Author has privileges to manage them.

dxrt will not operate on managed packages. Read more about Salesforce managed packages here.

Distribution

Downloading dxrt

Log in to download.delphix.com and navigate to the below path:

Home / Delphix Product Releases / Application Solutions / Salesforce / Delphix Rehearsal Tool

If you are experiencing any access issues, please contact your Delphix Account Team.

Running dxrt integration from Continuous Compliance

From Continuous Compliance Engine version 2025.3, you can enable and disable Salesforce metadata components by running the dxrt from the Engine rather than using the CLI. Running dxrt from the Continuous Compliance Engine allows you to enable or disable metadata elements such as triggers and duplicate rules within the Compliance Engine while leveraging the dxrt for task execution behind the scenes. For more information, see Running Rehearsal Tool from Continuous Compliance Engine and CData Salesforce driver support plugin.

Supported Platforms

  • MacOS 11.6+

  • Windows10

  • RHEL 8.x

Ensure you download the correct distribution for your operating system.

What’s included in the download?

dxrt comes as an OS-specific tar (zip for Win10) file. The tar(zip) file contains the dxrt command line tool.

This tool is helpful to validate the currently deployed metadata configurations on a Salesforce instance. It can be run before the masking jobs.

  1. It downloads the component files and deploys the same zip file without any change. If there is any failure, then there could be some problems in the configuration files. Therefore, we can get this information without running any masking job.

  2. If the masking job is failed then the post-task will not run. So that the metadata component can not be in the original state. Because enable process starts in post-task only. Therefore, this tool can be helpful to upload the zip file to enable the components.

  3. It can be used to disable and enable the components on its own. Here, it downloads the files and changes the values thereby making them inactive. Once that is done, zip the files and upload the zip file.

What’s Next?

If you have already downloaded dxrt, see Getting Started for information on installing and running dxrt operations.