18 votes
Accepted

Sandstorm sandbox?

If you look at some older release notes, it becomes slightly clearer what exactly Sandstorm may be: We’ve rebuilt our sandbox copy engine to optimize performance, scalability, and customer success. ...
Charles Koppelman's user avatar
15 votes

Can I use SalesforceDX to load data into sandboxes?

The short answer is: yes. All of the commands in the force:data command namespace work on any edition of Salesforce any org (provided API is enabled on that org). The long answer is: it depends on ...
pchittum's user avatar
  • 19.7k
13 votes

How to get the current sandbox-name programmatically (dynamically) via APEX?

After Spring'16 release there is an ability to specify an Apex class which executes every time the sandbox is copied. See SandboxPostCopy Interface. You can get the sandbox name from SandboxContext ...
Vadim  Rudkov's user avatar
13 votes
Accepted

Different values from URL.getSalesforceBaseUrl().toExternalForm()

In Winter 19, we will have a new method, System.Url.getOrgDomainUrl(), which will always return the correct URL. Use the new System.Url.getOrgDomainUrl() method to interact with Salesforce REST and ...
sfdcfox's user avatar
  • 490k
12 votes
Accepted

How to query the data that has been modified in last 30 MINUTES

The easiest way might be to make the following Minutes_Since_Modified__c formula: (NOW() - LastModifiedDate) * 24 * 60 Then to query for it: SELECT Id FROM Account WHERE Minutes_Since_Modified__c <...
Adrian Larson's user avatar
  • 150k
12 votes
Accepted

What is the path to Lightning SVG icons in a sandbox?

There are two locations, one for Lightning, and one for Visualforce. Lightning Replace the /assets/ of any URL in the Lightning Design System with /_slds/. Example: /_slds/icons/utility-sprite/svg/...
sfdcfox's user avatar
  • 490k
11 votes
Accepted

How to retrieve Custom Settings from Sandbox to a local SFDX Project?

They're the same as a CustomObject. You can retrieve one via the terminal: sfdx force:source:retrieve -m CustomObject:CustomSettingName__c In the Org Browser, they'll also be listed under Custom ...
sfdcfox's user avatar
  • 490k
10 votes

Clone Full Sandbox to Developer Sandbox?

Unfortunately, no. From the documentation: When you clone a sandbox, all its data and metadata are copied to the new sandbox. A cloned sandbox uses the same license type as its source org. For ...
Kasper's user avatar
  • 2,907
9 votes

Can we determine if the Salesforce instance is production org or a Sandbox org?

I do think there's a method that allows this without a SOQL query and without running the risk that URLs change because of domain name changes. (NOTE: this solution only works for distinguishing ...
Guy Clairbois's user avatar
9 votes

Differentiate Production/Sandbox Instance?

You should be able to write a formula that will expose a line saying "Production" or "Sandbox" by using your production id from Administer->Company Information. There are ...
Carlos Naranjo's user avatar
9 votes
Accepted

System.NullPointerException: Attempt to de-reference a null object: variable initialization statement

The line VS_Design__c nd1, nd2 = new VS_Design__c(); does not initialize nd1 From the Apex doc All variables are initialized to null if they aren’t assigned a value. For instance, in the ...
cropredy's user avatar
  • 71.3k
9 votes
Accepted

How to execute a class in Sandbox enviroment only, but have it on production as well?

This answer should help you. Long story short, method: public static Boolean runningInASandbox() { return [SELECT Id, IsSandbox FROM Organization LIMIT 1].IsSandbox; }
EvAzi's user avatar
  • 1,041
9 votes
Accepted

Is it possible to copy fields from Sandbox to Production?

Yes, you can use a change set to deploy fields from a sandbox to production. First, in your Production org, go to "Deployment Settings" and edit your sandbox's deployment settings to allow inbound ...
IllusiveBrian's user avatar
9 votes
Accepted

SFDX: Is it possible to push to a sandbox from VS Code?

You need to use the force:source:deploy command (not available in the UI, as far as I can tell). The basic syntax is as follows: sfdx force:source:deploy -p source-dir/ -u username-or-alias This ...
sfdcfox's user avatar
  • 490k
8 votes
Accepted

Do Unit Tests Increment Auto Number Fields?

Yes, autonumber field values will be incremented by unit tests. A new feature introduced in Spring '14 enables you to isolate autonumber values in tests from values used in production numbering. Text ...
Mark Pond's user avatar
  • 23k
8 votes
Accepted

How to identify the type of Sandbox in Apex?

I don't think there's a straightforward solution. As you've said, we have the Organization SObject which we can query to find certain environment information, such as: SELECT Id, InstanceName, ...
Davin Casey's user avatar
  • 4,217
8 votes
Accepted

What is the maximum number of system administrator can be created in developer sandbox

You can set everyone as administrator, if you want to, and you can create as many active users as you have licenses (Setup > Company Profile > Company Information). Most likely, you don't have any ...
sfdcfox's user avatar
  • 490k
8 votes
Accepted

Summer '17 sandbox for a Spring '17 org

Nope, you can't request a Summer 17 org at this time. The version is controlled during the new release preview. Generally, depending on the pod your sandbox is on, you must either refresh during a ...
sfdcfox's user avatar
  • 490k
8 votes
Accepted

How can I mask sensitive data in sandbox?

You can use SandboxPostCopy interface that allows you run an Apex class as soon as sandbox is refreshed. Use that class to run a batch class that makes your data encrypted. I have implemented ...
Pranay Jaiswal's user avatar
8 votes
Accepted

Are Custom Indexes passed on to Sandboxes

Yes. Documentation says so below:
Kris Goncalves's user avatar
7 votes
Accepted

Programmatically retrieve list of sandbox IDs linked to a production org

You can list sandboxes via Tooling API, by querying the SandboxInfo object. Select Id, SandboxName from SandboxInfo You can test this in DeveloperConsole's Query Editor tab by checking the "Use ...
Jason Clark's user avatar
  • 11.9k
7 votes

How to create dummy data in a newly created developer org

You could take advantage of the new feature to run a script when a sandbox is created or refreshed. You can find details about the feature in the latest release notes. I would run some apex code that ...
Mihai Neagoe's user avatar
  • 3,192
7 votes
Accepted

How do you prevent outbound messages from sandbox orgs as a 3rd party developer?

The outbound message includes the OrganizationId as a parameter. Before I discovered that, I built a formula field on the object using the $organization global variable to pass the org ID, which works ...
gorav's user avatar
  • 4,527
7 votes

How to get the current sandbox-name programmatically (dynamically) via APEX?

There is now an official solution that is out with the Spring' 22 release. You can use the new getSandboxName() method: System.Domain d = System.DomainParser.parse(URL.getOrgDomainUrl()); System.debug(...
Fabien Taillon's user avatar
7 votes
Accepted

Sandboxes - Full versus Partial Copy - Same Except Storage

There are more differences. A Full Sandbox can only be refreshed every 29 days, whereas a Partial Copy Sandbox can be refreshed every 5 days. Only sample data is copied to a Partial Copy Sandbox on ...
Adrian Larson's user avatar
  • 150k
7 votes
Accepted

Salesforce Sandbox as a backup

The sandbox gets the configuration of the Production environment from the time the sandbox is created as it takes a snapshot of the Metadata at that time. The refresh does not lock the production org. ...
Dave Humm's user avatar
  • 5,111
7 votes

Does enabling Dev Hub disable anything else? Can I turn off Dev Hub?

As per Enable the Dev Hub in Your Org: Enabling Dev Hub in a production or business org is completely safe and won’t cause any performance or customer issues. The Dev Hub is comprised of objects with ...
Daniel Ballinger's user avatar
7 votes
Accepted

Can I use SalesforceDX to load data into sandboxes?

You also can take a look at the SFDX plugin called SFDX-Data-Move-Utility. I took part in development of this plugin, which is hosted in the forcedotcom GitHub account under the BSD 3-Clause license ...
Haim K.'s user avatar
  • 111
7 votes
Accepted

Custom Metadata records Sandbox refresh

Yes. All metadata is copied. Refresh Your Sandbox Refreshing a sandbox updates the sandbox’s metadata from its source org. If the sandbox is a clone or if it uses a sandbox template, the refresh ...
Adrian Larson's user avatar
  • 150k
7 votes
Accepted

What exactly does refreshing sandbox do?

During a refresh, what happens is that Salesforce creates a brand new org that contains all of the objects, fields, page layouts, record types, users, and so on that the source org has so that it is ...
sfdcfox's user avatar
  • 490k

Only top scored, non community-wiki answers of a minimum length are eligible