Saturday 27 February 2016

SandboxPostCopy : featured Post Refresh Activity

Hi Folks,

Today I am going to discuss about a very beautiful features Salesforce just released. This features to make your sandbox environment business ready, automate data manipulation or business logic tasks.

While creating/refreshing any sandbox from you may need to run any logic just after completion of refresh so now it is possible using this feature called "SandboxPostCopy" interface.

Here I am taking an example where I need to create some couple of records of an opportunity object just after completing with refresh activity.

I should have a class in production as below


global class createOpportunity implements SandboxPostCopy {
  global void runApexClass(SandboxContext context) {
        // write your logic to create opportunity
     }
  }

then while refreshing/creating sandbox you need to select this class to be executed as below:



Thanks for reading.!!




No comments:

Post a Comment