Questions tagged [sandboxpostcopy]
The sandboxpostcopy tag has no usage guidance.
30 questions
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 ...
1
vote
1
answer
146
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 ...
0
votes
1
answer
795
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'...
0
votes
2
answers
336
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:
...
2
votes
1
answer
172
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 ...
0
votes
1
answer
500
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
...
4
votes
0
answers
153
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 ...
0
votes
0
answers
1k
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 ...
0
votes
0
answers
291
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 (...
3
votes
0
answers
1k
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. (...
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.
...
1
vote
1
answer
522
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 ...
0
votes
1
answer
434
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 ...
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 ...
4
votes
0
answers
170
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 ...
3
votes
1
answer
434
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 ...
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' ...
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 ...
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 ...
3
votes
1
answer
330
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 ...
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?
...
2
votes
0
answers
175
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 ...
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) ...
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 ...
0
votes
1
answer
397
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 ...
4
votes
2
answers
3k
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 ...
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 ...
7
votes
1
answer
888
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 {
...
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 ...
10
votes
2
answers
9k
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 ...