Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [sandboxpostcopy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

How to refresh token and set Apex class PostCopy via sf cli

I'm following this document to trigger refresh sandbox, also want to set Apex class in post copy sf data update record --json --use-tooling-api --target-org $targetOrgAlias \ --sobject ...
vctqs1's user avatar
  • 75
1 vote
0 answers
32 views

How to do automation install package after sandbox created [duplicate]

Im trying to do continues deployment everytime sandbox refresh. But it was work fine if trigger via Developer Console (via personal account) But there is nothing happen/run if trigger via Automation ...
vctqs1's user avatar
  • 75
1 vote
1 answer
104 views

Sandbox Post Creation APEX Script not working

I have the following Apex Class that I created in a developer instance. When I execute anonymous window it creates random dummy data. But when I add it to a Sandbox refresh or creation, it seems to ...
andrew's user avatar
  • 149
0 votes
1 answer
657 views

To seed the data from production into the developer sandbox using SandboxPostCopy interface

I don't have much experience in the creation of sandboxes. I have a requirement to seed some data from Prod into the sandbox using SandboxPostCopy interface. Is there any way I can do that using SOQL'...
Rahul Allada's user avatar
0 votes
2 answers
284 views

create CollaborationGroup in SandboxPostCopy Class

Anyone have experience in creating a CollaborationGroup using SandboxPostCopy class ? My requirement is to create a Public Group in newly refreshed sandbox. I have tried following ways but no success: ...
Chirag Verma's user avatar
1 vote
1 answer
149 views

SandboxPostCopy - portal account owner must have a role: []

I am creating a SandboxPostCopy class that generates some mock data in our sandboxes when we do a refresh. If I run the class via anonymous window, it works fine and builds all the goodies. If I run ...
TylerTwoForks's user avatar
0 votes
1 answer
423 views

Add "API Enabled" access to Automated User

I want to create Profile Login Api Range during sandbox creation or refresh. I'm using SandboxPostCopy interface and Metadata Service. I saw something similar in this question : sandboxpostcopy ...
Vitalii Dehnerys's user avatar
4 votes
0 answers
138 views

SandboxPostCopy callout throws UnexpectedException

When I attempt to perform a callout from a SandboxPostCopy class when creating a sandbox, it throws the following UnexpectedException: System.UnexpectedException: Attempt to release db connection when ...
Jeff's user avatar
  • 919
0 votes
0 answers
958 views

How do I write test methods for a @future method in a SandboxPostCopy class?

My team uses a sandbox for user onboarding, so I wrote a SandboxPostCopy class to populate the training sandbox with sets of records and create test users on refresh. The class compiles and, as far as ...
E. Csongradi's user avatar
0 votes
0 answers
262 views

Automatically update profile IP restrictions that depend on the environment

Our setup has integrations that access Salesforce through service users. This users profiles have IP whitelists. Now a new system has Internet-facing IP ranges that depend on the environment (...
georg w.'s user avatar
  • 1,224
3 votes
0 answers
870 views

Import CA-Signed Certificate from One Org into Another via MetadataAPI

I am trying to automate the set up of some of my lower sandboxes. In my SandboxPostCopy class, I'm using the FinancialForce MetadataAPI wrapper MetadataService to query and upsert a certificate. (...
S.B.'s user avatar
  • 2,081
2 votes
1 answer
2k views

Dynamically set Connected App Callback URL

I am trying to dynamically update the callback url in a connected app. When creating a sandbox, I want to run an apex class that change the callback URL from a production to UAT callback endpoint. ...
S.B.'s user avatar
  • 2,081
1 vote
1 answer
453 views

Update email address and profile on SandboxPostCopy MIXED DML OPERATION error

I've been trying to update user emails and profiles after a sandbox is created and using the SandboxPostCopy interface. However I keep running into the below error: Update failed. First exception ...
Minz's user avatar
  • 101
0 votes
1 answer
395 views

Workflow Task Error When Trying to Deactivate a User from a SandboxPostCopy Apex Test

I'm trying to deactivate a user in an apex test. But am getting an error that the user (that I just created in the test) in being used by workflow tasks. The class implements SandboxPostCopy and is to ...
Navigatrix's user avatar
1 vote
0 answers
1k views

SandboxRefresh Class will not run on refresh but will run in Anonymous Context

Here is my code for the SandboxRefresh class that I'm trying to run. The batch classes have a finish method that does attempt to send emails, and I'm wondering if the default Deliverability settings ...
thinker's user avatar
  • 1,430
4 votes
0 answers
153 views

What Does Automated Process User Not Have Access To?

While working on a SandboxPostCopy script, I came across the following warning on a Salesforce article: So it sounds like there are certain things that cannot be done with the script, but I haven't ...
Developer Guy's user avatar
3 votes
1 answer
385 views

Does Test.testSandboxPostCopyScript Actually Run DML?

I have a SandboxPostCopy class where I am updating some User fields (example: changing the email to remove the '.invalid' and setting Profiles) where the Users to be updated are controlled by Custom ...
Developer Guy's user avatar
4 votes
2 answers
3k views

Is it Possible to Change a User's Email and Reset Password at Same Time via Apex Code?

When using the Saleseforce UI, it is possible to change a user's email and send them a password at the same time by changing the email and clicking 'Generate new password and notify user immediately' ...
Developer Guy's user avatar
1 vote
1 answer
116 views

SandboxPostCopy Profile Name

Does anyone know what profile name or Id a SandboxPostCopy implementation occurs in? The code that I have to run after a refresh/cloning keeps hitting a validation rule based on the profile but since ...
RachelK's user avatar
  • 79
2 votes
1 answer
2k views

Sending email in sandbox post copy

When I refresh a sandbox I have a class that runs to fix some things like email addresses and custom settings. I've also been asked to email the developer the new org ID so that their testing ...
denvergreene's user avatar
  • 1,198
3 votes
1 answer
294 views

Why Apex Exceptions Email Settings are not copied to Sandbox upon sandbox refresh?

Why Apex Exceptions Email Settings are not copied to Sandbox upon sandbox refresh? We need to manually setup Apex Exceptions Email Settings every time after sandbox refresh. Is there any way to make ...
Patlatus's user avatar
  • 17k
1 vote
2 answers
3k views

Would Refreshing a Sandbox Wipe Out Certain Metadata?

If I have custom-setting metadata (or any other custom objects) in a partial-copy sandbox and not in production, then I refresh the sandbox, will that metadata be wiped out and have to be recreated? ...
Gabriel Rivera's user avatar
2 votes
0 answers
165 views

Pushing a git repository to a Sandbox via a PostCopy script

I am currently trying to automate the whole process for working with Sandboxes in my company. As of now, we have a CLI tool which both refreshes the sandboxes and executes an Apex anonymous script to ...
Javier García's user avatar
1 vote
2 answers
4k views

Execute SandboxPostCopy Interface from Anonymous Window

How can we execute SandboxPostCopy Interface from Anonymous Window for testing purpose. global class PrepareMySandbox implements SandboxPostCopy { global void runApexClass(SandboxContext context) ...
learnjqueery's user avatar
1 vote
3 answers
2k views

Automate master data loading after sandbox refresh

Test.loadData is used to load CSVs into an object during Test Class execution. This test data exists only in the eyes of the test class. In order to load master data using Apex after a refresh, is ...
Shumon Saha's user avatar
  • 4,632
0 votes
1 answer
379 views

Invalid interface:SandboxPostCopy

I am trying to create class that can be used post sandbox refresh and I am getting Invalid Interface:SandboxPostCopy error when trying to save. Below is the code that I am using. global class ...
sfdcdev's user avatar
  • 39
4 votes
2 answers
2k views

Are Scheduled Jobs copied after Sandbox Refresh?

Are Scheduled Jobs copied after Sandbox Refresh? I did a refresh of a full copy sandbox and looked at the scheduled jobs but not all of them are there. Anyone has any ideas of the criteria used to ...
d0001's user avatar
  • 518
5 votes
1 answer
2k views

Any good solutions to disable remote site settings after Sandbox refresh?

Has anybody come up with any automated solution for disabling remote site settings after a sandbox is created or refreshed? I'm trying to prevent situations where someone creates a developer sandbox ...
Jamie G's user avatar
  • 298
7 votes
1 answer
871 views

SandboxPostCopy and Organization.IsSandbox

Could you tell me what would be the value of IsSandbox if I specify the following class during sandbox creation? Will it be 'true' or 'fasle'? global class HelloWorld implements SandboxPostCopy { ...
mardok's user avatar
  • 195
13 votes
2 answers
8k views

Run Script After Sandbox Creation and Refresh

With the Spring '16 release, there is new functionality where we can set a script to run after refreshing a sandbox. In the documentation it gives an example where it prints the three context ...
martin's user avatar
  • 12.7k
10 votes
2 answers
8k views

How to use new SandboxPostCopy?

The new Sandbox Post Copy tasks are a great addition and I'm eager to try them but until the release to Production starts on Feb. 6, it seems impossible to experiment with the behavior. I ...
AlwaysThinkin's user avatar