1

I am involved in doing QA in a stage full sandbox environment. I am interested in being able to populate the sandbox with a small amount of consistent (I cant rely on production data) test data. Is there a way to make specific non production data be created/imported automatically after every refresh?

3

Since you have a Full Copy Sandbox , In your production org you will see a Tab named "Sandbox Templates".

Sandbox templates allow you to pick specific objects and data to copy to your Full or Partial Copy sandbox to control the size and content of each sandbox.

Here is the official docs to help you set up the sandbox templates .You will need to create these templates and associate , so that every time you do a refresh the sample data is populated .

It will be a random dataset from your PROD org .

Ideally would recommend a partial sandbox because the refresh interval is small rather than Full Copy which you will have to wait longer to refresh .

If you want to further automate it , you will need to use dataloader and its command line capability to script so that you can automatically upload it .

6

If you're willing to take the time, the SandboxPostCopy interface lets you write code that's called once upon refresh. You could write a bunch of code to populate records. If you're planning on moving to DX, force:data:import lets you import JSON files into your orgs using the new SObject Tree API, which automatically creates records and associates them with their parent records automatically, which is simple compared to using the Apex Data Loader CLI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.