Skip to main content

Sandbox Refresh

When Salesforce refreshes a sandbox, it gives the sandbox a new Org ID. aprity identifies an installation by its Org ID, so after a refresh the sandbox is no longer the org aprity registered. This page explains what you will see and how to reconnect.

What you see​

The setup wizard shows a warning​

When you open the aprity app in the refreshed sandbox, you see the aprity Setup Wizard with this warning:

This installation belongs to another organization or its identity cannot be verified. An administrator must reset the local connection before registering this organization.

This happens on Full Copy and Partial Copy sandboxes. These sandbox types copy the aprity configuration and the signing key from the source org. aprity detects that the stored Org ID is not the Org ID of the sandbox.

Analyses fail​

aprity checks the Org ID on every connection to Salesforce. If the Org ID does not match the registered org, aprity refuses the connection. This protects the source org: a copied sandbox cannot act as your production installation.

The sandbox looks unregistered​

Developer and Developer Pro sandboxes do not copy the aprity configuration. After a refresh, the app starts again at the registration step.

How to reconnect​

  1. Contact aprity support first. Tell support that the org is a refresh of a sandbox that was already registered, and give the new Org ID (Setup > Company Information). aprity sees the refreshed sandbox as a new org. Support will give you the right activation code, so that your plan, your analysis history and your portal address stay linked to your account.
  2. If the wizard shows the warning above, a user with the aprity Admin permission set clicks Reset this local connection. This removes the copied connection and signing key from the sandbox only. The source org is not changed.
  3. Register the sandbox with the activation code from support. See Registration Fails if the code is refused.
  4. Set up the External Client App again, because Salesforce does not keep it in a refreshed sandbox. Follow the setup wizard steps.
  5. Run a new analysis, so that the documentation describes the sandbox as it is after the refresh.
caution

Do not register a refreshed sandbox with a new-customer code without talking to support first. That creates a separate aprity account, and your existing plan, history and portal address stay on the old one.

Prevent copied connections​

aprity ships a sandbox post-copy class, FR_SandboxPostCopy. It removes the copied aprity configuration and signing key right after a sandbox copy.

Salesforce runs a post-copy class only if an administrator selects it when creating or refreshing the sandbox (Apex Class field in the sandbox options). The package cannot select it for you. If you do not select it, use Reset this local connection as described above.