Enable (Rehearsal tool)
Use the enable dxrt operation to upload a packaged zip file containing metadata components. It uses the metadata file-based deploy API.
Access help
MacOSX or Linux
./dxrt salesforce enable --help
Windows
.\dxrt.exe salesforce enable --help
Syntax
MacOSX or Linux
./dxrt salesforce enable --parameter-name value
Windows
.\dxrt.exe salesforce enable --parameter-name value
Parameters
The following are the parameters for the enable operation.
Required parameters are marked with a *.
Parameter |
Description |
---|---|
*-a, –-auth_type |
Authentication mechanism used [Options: OAUTH or USERPASS] |
*-u, –username |
Salesforce username for Auth Type USERPASS |
*-ci, –-client_id |
Salesforce client id for Auth Type OAUTH |
*-ur, –-url |
Url of the salesforce sandbox for Auth Type OAUTH |
*-z, –zip_file |
Path to the zip file that contains the components to enable. |
-i, –is_production |
Specify flag is_production, if you are trying to connect to a production environment. |
-f, –force |
Ignore errors while deploying. |
-it, --is_interactive |
This flag needs to be provided if the user intends to provide the password/secret keys in the interactive manner via prompt. |
-e, --env_vars |
Here, User needs to provide the list of environment variable names containing password,security tokens. In case of authentication type being ‘USERPASS', user needs to pass Password & Security token here. These can be passed as ‘dxrt_password,dxrt_security_token’. In case of authentication type being ‘OAUTH’, user needs to pass client_secret, access_token, refresh_token. These can be passed as 'dxrt_client_secret,dxrt_refresh_token,dxrt_access_token’. Please note that the name of the environment variables provided above are only for reference. User can provide different names as well. However the sequence in which the variables are provided should be kept same as above. |
There are two ways in which password/secret tokens can be provided to the enable command:-
-
Using interactive mode:
The enable command prompts the user to enter credentials for each type of authentication (USERPASS and OAuth). The user can use this mode by passing the "-it" option in the dxrt command, like this:
The enable command prompts the user to enter credentials for each type of authentication (USERPASS and OAuth):
a) Entering the password and security token for authentication type USERPASS.
b) Entering client secret, access token and refresh token for Authentication Type OAUTH
Prompted Parameters |
Description |
---|---|
Password: |
Prompt for Salesforce user’s password for auth_type=USERPASS After the user enters the password, there will be a confirmation prompt to enter the same password as before. |
Security Token: |
Prompt for Salesforce user’s security token for auth_type=USERPASS |
Client Secret: |
Prompt for Salesforce client secret for auth_type=OAUTH |
Access Token: |
Prompt for Salesforce access token for auth_type=OAUTH |
Refresh Token: |
Prompt for Salesforce refresh token for auth_type=OAUTH |
-
Using Environment Variables:
When using this option, the user must provide the required password/security tokens using the -e option in the dxrt enable command. The user can save the value of these parameters under any name they choose. However, the sequence in which these parameters must be passed cannot be changed. The following is how the user can pass these values into the enable command:
a) -e dxrt_password, dxrt_security_token for authentication type USERPASS
b) -e dxrt_client_secret, dxrt_refresh_token, dxrt_access_token for authentication type OAUTH
Please note that the names of the environment variables provided above are only for reference and can be changed; however, the variable sequence cannot be changed.
Setting up environment variables for dxrt:
Please see here for instructions on how to set the environment variables for the various platforms supported by dxrt.
Sample Enable command using Username, Zip File for Authentication mechanism USERPASS
Using interactive mode (-it):
The enable command prompts the user to enter password and security token.
MacOSX or Linux
./dxrt salesforce enable -z <retrieveResults.zip> -u <username@abc.com> -a USERPASS -it
Windows
.\dxrt.exe salesforce enable -z <retrieveResults.zip> -u <username@abc.com> -a USERPASS -it
Using environment variables(-e):
MacOSX or Linux
./dxrt salesforce enable -z <retrieveResults.zip> -u <username@abc.com> -a USERPASS -e 'dxrt_password,dxrt_security_token'
Windows
.\dxrt.exe salesforce enable -z <retrieveResults.zip> -u <username@abc.com> -a USERPASS -e 'dxrt_password,dxrt_security_token'
Note : User need not provide the same environment variable names as shown in the above example. However, the sequence of variables cannot be changed.
Sample enable command using Client ID and Zip File for Authentication mechanism OAUTH
Using interactive mode(-it):
The enable command prompts the user to enter client secret, access token and refresh token.
MacOSX or Linux
./dxrt salesforce enable -z <retrieveResults.zip> -ci <client_id> -ur <url> -a OAUTH -it
Windows
.\dxrt.exe salesforce enable -z <retrieveResults.zip> -ci <client_id> -ur <url> -a OAUTH -it
Using environment variables(-e):
The enable command prompts the user to enter client secret, access token and refresh token.
MacOSX or Linux
./dxrt salesforce enable -z <retrieveResults.zip> -ci <client_id> -ur <url> -a OAUTH -e 'dxrt_client_secret,dxrt_refresh_token,dxrt_access_token'
Windows
.\dxrt.exe salesforce enable -z <retrieveResults.zip> -ci <client_id> -ur <url> -a OAUTH -e 'dxrt_client_secret,dxrt_refresh_token,dxrt_access_token'
Note : User need not provide the same environment variable names as shown in the above example. However, the sequence of variables cannot be changed.