You need to sign in to do that
Don't have an account?
Paul Worlton
Why can't a sandbox deploy script create test data?
I have a sandbox deploy script that works fine for setting environment variables but fails to create test data that I always need. If I run the data insert methods manually, they work fine - but the deploy script seems to skip those methods. Is this an issue with calling static methods or does SandboxPostCopy intentionally block SOQL inserts?
The following is my main function:
// Main deploy script global void runApexClass(SandboxContext context) { // Set org to dev Server__c srv = Server__c.getOrgDefaults(); srv.Environment__c = 'dev'; srv.Disable_Rules__c = true; upsert srv; createDummyAccountContact(); createTestLeads(10); createTestLoans(4); }
Raj Vakati
You need to do it like below