Hot answers tagged

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. ...
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 ...
  • 19.3k
14 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 ...
  • 4,582
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, ...
  • 4,370
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 ...
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 ...
  • 456k
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 <...
  • 146k
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;} ....
  • 13.5k
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" ...
10 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 ...
  • 456k
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 ...
  • 22.3k
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 ...
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 ...
  • 65.7k
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; }
  • 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 ...
  • 456k
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 ...
  • 672
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 ...
  • 22.6k
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, ...
  • 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 ...
  • 456k
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 ...
  • 456k
8 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 ...
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 ...
8 votes
Accepted

Are Custom Indexes passed on to Sandboxes

Yes. Documentation says so below:
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 ...
  • 2,803
8 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/...
  • 456k
7 votes

Can we deploy PROFILES alone from one sandbox to another?

You can absolutely deploy profiles and permission sets safely, provided you keep a few things in your mind: 1) Profiles work like junction objects when retrieving them from salesforce. In other words,...
  • 1,159
7 votes
Accepted

Production and Developer Sandbox

Firstly, your terminology is a little off. See this link for an overview of the different sandbox types. Secondly, you can't have production volumes of data in a dev. or dev. pro sandbox. That is not ...
  • 4,207
7 votes
Accepted

How is a Salesforce Sandbox licensed?

You need to contact your AE for this pricing information. We are unable to provide you an accurate response. It really varies by customers. When you do an upgrade/contract renewal the AE might throw ...
  • 1,426
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 ...
  • 3,182
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 ...
  • 4,325

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