All Projects → GSA → sf-sandbox-post-copy

GSA / sf-sandbox-post-copy

Licence: other
A framework for managing automation tasks that are fired upon sandbox refresh in Salesforce orgs.

Programming Languages

Apex
172 projects

Projects that are alternatives of or similar to sf-sandbox-post-copy

omakase
Java-based, plugin-oriented CSS3+ parser
Stars: ✭ 13 (-70.45%)
Mutual labels:  salesforce
sfdx-js
A TypeScript compatible JavaScript wrapper for Salesforce DX CLI.
Stars: ✭ 30 (-31.82%)
Mutual labels:  salesforce
apex-utils
Utility classes for Salesforce Apex development
Stars: ✭ 20 (-54.55%)
Mutual labels:  salesforce
backup-force.com
Export and backup salesforce.com Database locally
Stars: ✭ 30 (-31.82%)
Mutual labels:  salesforce
311
New web portal for BOS:311
Stars: ✭ 15 (-65.91%)
Mutual labels:  salesforce
ApexTriggerHandler
Another library implements Apex trigger handler design pattern.
Stars: ✭ 40 (-9.09%)
Mutual labels:  salesforce
siteshooter
📷 Automate full website screenshots and PDF generation with multiple viewport support.
Stars: ✭ 63 (+43.18%)
Mutual labels:  salesforce
aptk-graphsql
Extends your Salesforce API with basic GraphQL capabilities, allowing you to run GraphQL queries on your Salesforce data.
Stars: ✭ 26 (-40.91%)
Mutual labels:  salesforce
APEX-Q
A promise library for Salesforce
Stars: ✭ 30 (-31.82%)
Mutual labels:  salesforce
node-swagger-salesforce
auto generate a node/express swagger CRUD API for your Salesforce
Stars: ✭ 17 (-61.36%)
Mutual labels:  salesforce
sfdx-lightning-api-component
⚡️ Promise-based service component for calling REST API from Lightning Aura Components without Named Credentials.
Stars: ✭ 62 (+40.91%)
Mutual labels:  salesforce
sf-cross-cutting-concerns
Apex Cross cutting concerns for Salesforce
Stars: ✭ 29 (-34.09%)
Mutual labels:  salesforce
fast-sfdc
A VSCode plugin to develop Salesforce projects in vscode
Stars: ✭ 16 (-63.64%)
Mutual labels:  salesforce
artefactory-connectors-kit
ACK is an E(T)L tool specialized in API data ingestion. It is accessible through a Command-Line Interface. The application allows you to easily extract, stream and load data (with minimum transformations), from the API source to the destination of your choice.
Stars: ✭ 34 (-22.73%)
Mutual labels:  salesforce
ssjs-lib
An open-source library that takes the repetitive and complex tasks and simplifies them, enabling you to get the most out of Salesforce Marketing Cloud.
Stars: ✭ 28 (-36.36%)
Mutual labels:  salesforce
Apex-Integration-Services
Apex REST Callouts, Apex SOAP Callouts, Apex Web Services
Stars: ✭ 36 (-18.18%)
Mutual labels:  salesforce
Salesforce-Short-Hands
The main purpose of this repository is to put all the utilities in one place so that other developers can get help and they can also contribute to this repo.
Stars: ✭ 31 (-29.55%)
Mutual labels:  salesforce
DXB
A utility cli plugin built on top of #SFDX to facilitate devops.
Stars: ✭ 20 (-54.55%)
Mutual labels:  salesforce
salesforce-plantuml
Salesforce app to generate UML class & ER-diagrams from your org data. Leverages the PlantUML library.
Stars: ✭ 89 (+102.27%)
Mutual labels:  salesforce
apex-query-builder
Convenient query builder for dynamic SOQL queries
Stars: ✭ 37 (-15.91%)
Mutual labels:  salesforce

sf-sandbox-post-copy

A framework for managing automation tasks that are fired upon sandbox refresh in Salesforce orgs.

BACKGROUND

Preparing sandboxes for use by development teams or other users has traditionally required manual action.

With the Salesforce Spring '16 release, the platform provides a capability to automate data manipulation or business logic tasks.

More specifically, the platform defines the SandboxPostCopy interface and allows an administrator at the time of a sandbox create or refresh action to select an Apex class implementing this interface. The Apex class then executes within the sandbox as it is prepared for use.

This repository contains an extensible framework for organizing sandbox post copy automation tasks within your org.

FRAMEWORK OVERVIEW

Apex Classes

SBX_PostCopyManager - Implements the Salesforce SandboxPostCopy interface.  Delegates to SBX_PostCopyWorkerFactory to obtain a collection of classes containing automation logic then invokes each class's processing.

SBX_PostCopyManagerTest - Test class for SBX_PostCopyManager.

SBX_PostCopyUtil - Utility functions used by the framework.

SBX_PostCopyWorker - An abstract class defining behavior common to all automation tasks and defining an abstract method which subclasses override.

SBX_PostCopyWorkerFactory - Factory class responsible for creating all subclasses of SBX_PostCopyWorker for the organization.  Uses the Post Copy Task custom metadata type and the Type class to instantiate each required class.  

SBX_PostCopyWorkerFactoryTest - Test class for SBX_PostCopyWorkerFactory.

Custom Objects

Post Copy Log - Records the success or failure of an automation task

Tabs

Post Copy Log

Page Layouts

Post Copy Log Layout

Post Copy Task Layout

Custom Metadata Type

Post Copy Task - Each record identifies an Apex class which performs an automation task during the creation or refresh of a sandbox. 

INSTALLATION

Use the Force.com Migration Tool to deploy the framework using the code, configuration and package.xml from this repository.

EXTENDING & USING THE FRAMEWORK

  1. Implement each of your automation tasks in the run() method of an Apex class extending SBX_PostCopyWorker.

  2. Create a corresponding record in the Post Copy Task custom metadata type for each Apex class.

  3. Deploy your Apex class(es) and the custom metadata type record(s) to production.

  4. Initiate a sandbox create or refresh action. When prompted, specify SBX_PostCopyManager as the Apex class.

  5. Once the sandbox is accessible, review record(s) in the Post Copy Log custom object to view the status of each task.

RUNTIME CONSIDERATIONS

The subclasses of SBX_PostCopyWorker will execute in a single transaction and in aggregate are subject to the Per Transaction Apex limits.

The synchronous limit of 100 SOQL queries in a transaction could be reached as the number of subclasses grows. Should this limit be reached, move the processing of the SBX_PostCopyWorker subclass to another class that implements the Queueable interface. In the run method of the SBX_PostCopyWorker subclass, call the Queueable class using System.enqueueJob.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].