Hot answers tagged

139 votes
Accepted

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

In Summer '14, (version 31.0), there is a new field available on the Organization object. SELECT IsSandbox FROM Organization LIMIT 1 From the release notes under New and Change Objects: The ...
user avatar
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. ...
user avatar
15 votes
Accepted

How long should it take to refresh a Developer Sandbox?

A status of Pending means, the sandbox refresh still hasn't started because other people's sandbox refresh requests are ahead of your request in the queue. Therefore, Salesforce doesn't provide SLA ...
user avatar
  • 4,532
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 ...
user avatar
  • 19.1k
13 votes
Accepted

Maximum CPU time limit allowed to be exceeded in Sandbox

The system has the right to terminate any process that run longer than 10,000 ms in execution time, but it does not have the responsibility to do so. This means that during peak loads, your code might ...
user avatar
  • 430k
13 votes
Accepted

Are sandboxes slower than production Orgs?

Also, use the staging environment to perform stress and performance testing. Note that because the hardware for sandbox in the Force.com platform differs from the production organization hardware, ...
user avatar
  • 4,310
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 ...
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 ...
user avatar
  • 430k
11 votes

How do I test email to case in the Sandbox

What Brian is trying to tell you is that there are different email addresses for Production and for Sandbox Email to Case. Cases are being created in Production because you are using a production ...
user avatar
  • 2,063
10 votes
Accepted

Background color scheme for distinguishing between environments (Sandbox vs Production)

I have added below html code to home page component <style> body.sfdcBody{background-color:green;background-image:none;} .multiforce{background-color:green;background-image:none;} ....
user avatar
  • 13.3k
10 votes
Accepted

How do I stay logged into Multiple Sandboxes?

Understanding that you're mainly looking for a way to stay logged in to many sandboxes at the same time, chrome is the answer here. Got to your chrome settings ( chrome://settings/ ) Under "people" ...
user avatar
10 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 <...
user avatar
  • 142k
9 votes

Is it possible to get ALL the changes in a sandbox? and how?

Create a new project in eclipse force.com Ide with components like custom objects,reports,vf pages,apex.Then try to deploy the components to server(sandbox) to know the difference the between ...
user avatar
  • 13.3k
9 votes

How do I test email to case in the Sandbox

You will need to update the email forward for Email-to-Case to the new email when you setup the email address in Sandbox. The addresses are different in the two environments. The test email is sent ...
user avatar
9 votes
Accepted

Why not use unmanaged packages to migrate metadata to production?

Having unmanaged package installation approach in production you can't Uninstall the package if it is being referenced by component which is not part of that package You can not upgrade unmanaged ...
user avatar
  • 22.2k
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 ...
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 ...
user avatar
  • 61.4k
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; }
user avatar
  • 1,031
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 ...
user avatar
  • 430k
9 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 ...
user avatar
  • 430k
8 votes
Accepted

Ids in Salesforce - Same across environments?

yes the record type ids will be the same. And that's not just for record types, field ids and any object prefixes (first three parts of a record id) will also be the same. they will differ. If you ...
user avatar
  • 662
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 ...
user avatar
  • 22.3k
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, ...
user avatar
  • 4,207
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 ...
user avatar
  • 430k
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 ...
user avatar
  • 430k
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 ...
user avatar
8 votes
Accepted

Are Custom Indexes passed on to Sandboxes

Yes. Documentation says so below:
user avatar
8 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 ...
user avatar
  • 2,653
7 votes
Accepted

How to login into a sandbox from Sandboxes page in Production org?

Take a look at this document : https://help.salesforce.com/HTViewHelpDoc?id=data_sandbox_create.htm&language=en_US Users can log into the sandbox at https://test.salesforce.com by appending ...
user avatar
  • 16.5k
7 votes
Accepted

Datamigration Salesforce to Salesforce with TalenD - Best Practice for Self-Referreces

For objects with self-reference (aka "Hierarchy") fields, the best method is to load in two steps: Load all records but leaving out the ParentId field (remove it from Talend schema). Update all ...
user avatar
  • 186

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