Skip to main content
Hi,

I created a class in my PROD environment that implements SandboxPostCopy. My undersating is that when I create/refresh a sandbox and specify my class, the code in that class will be executed upon creating/refreshing the sandbox.

Here is the code I am using for the SandboxPostCopy class.

global class SandboxRefreshCutover implements SandboxPostCopy {

global void runApexClass(SandboxContext context) {

System.debug('Sandbox copy done. ' + context.organizationId() + ' ' + context.sandboxId() + context.sandboxName());

//Replace the URL endpoint in a Customer Setting

Integration_Endpoints__c integrationEndpoint = Integration_Endpoints__c.getValues('TEST');

if(integrationEndpoint != null)

{

integrationEndpoint.URL__c = 'http://www.test.com';

update integrationEndpoint;

}

else

{

integrationEndpoint = new Integration_Endpoints__c(Name = 'TEST', URL__c = 'http://www.test.com');

insert integrationEndpoint;

}

}

}

Now, I tried to create a few developer sandboxes and everytime the code is not executed.

Am I missing something?

Thanks a lot in advance.

Etienne
11 risposte
  1. 15 mar 2016, 08:20
    Apparently it is beeing rolled out as of now. Some orgs has the fix others do not. I did not see this issue in known issues, so you cant follow it there I am sorry.
0/9000