Hot answers tagged

113

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 Organization object has the following new read-only fields. InstanceName IsSandbox You can, for example, create a lazy loader that other classes can ...


37

Salesforce actually can revert this change for up to 72 hours after the refresh/deletion. I have run into this exact issue, and SF support was able to revert the sandbox back. You just need to make sure you contact them within 72 hours. Although our Customer Success Rep told us that they can usually get it for up to a week, they only commit to 72 hours, ...


36

Disable Scheduled Apex Jobs Disable Outbound Messages or point them to QA server endpoints. Reconfigure External Web Service calls for a non-production environment Overwrite Custom Settings to non-production ones - might vary between projects but worth to check. Sometimes custom integration credentials are saved as Custom Settings. Disable S2S connection ...


25

It's not perfect but the static method System.URL.getSalesforceBaseUrl() Will allow you to scrape the instance name, will that be sufficient to distinguish between production and sandbox?


23

Michael Farrington recently posted an Apex method for this on his blog: http://www.michaelforce.org/recipeView?id=a0Ga000000Ekp65EAB This method uses URL.getSalesforceBaseUrl().getHost() which should work in a trigger.


17

When a sandbox is created from an org with an active managed package license the sandbox will act as if it had a site license. The net effect of this is that all users in the org are automatically and always licensed without having to manage licensing per-user. I don't know if this behavior is documented but I've seen it time and time again while working ...


14

Have a look under Setup | Email Administration | Deliverability. Newly created sandboxes have the default email deliverability set to "System email only." The options are: No access: Prevents all outbound email to and from users. System email only: Allows only automatically generated emails, such as new user and password reset emails. All email: Allows all ...


13

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, the results of performance testing on sandbox might not match those in production. Nonetheless, performance testing on the staging sandbox can still help catch ...


12

I have a few ETL scripts I built using Talend Open Studio to move data over. Using a tool like Talend (which is Free and has SFDC Connectors) or Informatica Cloud or Boomi, you can create scripts to pull data from your Production Org and populate in your Sandbox Org. Of course depending on your sandbox you'll hit size limits so you need to filter your data ...


12

EDIT: The solution is for problems caused before the release of Winter '14. First, thank you for the help! Here's how the solution worked for me: As posted above, the link, https://success.salesforce.com/issues_view?id=a1p30000000T091AAC, suggests: Code coverage should be provided upon running all tests. So, I went to Develop --> Apex Text ...


12

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 time. There's nothing much you can do but wait (indefinitely). Yes it is true that sometimes it can range from seconds to days to get to the front of this queue. ...


12

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. The new engine impacts Full sandboxes as they are created and existing Full sandboxes as they are refreshed. ... Several enhancements to the copy ...


12

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 and store it in a custom setting. Notice the example indicates this method signature exists: SandboxContext.sandboxName(). global class HelloWorld implements ...


12

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 what you need as far as data. The full command list is as follows: ➜ ~ sfdx force:data Usage: sfdx force:data:COMMAND [command-specific-options] manipulate ...


11

When you're building something you know will be deployed, start building the change set at the same time. Every change you make to metadata, add it to the change set or to some spreadsheet you're keeping of required manual changes. Also, every time I make a new change set I mark it as "v1", since I generally get up to at least v3 before the change set can ...


11

According to this page, it is a known issue for which a patch is scheduled to be deployed tonight http://success.salesforce.com/issues_view?id=a1p30000000SU7PAAW


11

There isn't a way to 'Clone' a sandbox i.e. click one button to do it kinda thing. You can deploy stuff across via Change Sets Force.com IDE Force.com Migration Tool Or a combination of them. Refreshes are only possible from Production to Sandbox. (If you meant that the destination sandbox doesn't already exist and you first need to create one, then ...


11

From the Salesforce.com Help Docs Newly created sandboxes have the default email deliverability setting System email only.To configure email deliverability settings, in the sandbox organization, click Your Name | Setup | Email Administration | Deliverability. If editable, set the Access level in the Access to Send Email section. You may not be able to ...


10

Just create a ticket with support and ask them to remove that refresh, they can do that.


10

I think that is the only difference. As Mohith points out in his answer, the difference in data limits has practical implications for how various sandboxes are used.


10

You can use the Metadata API or the sf:deploy task in Ant to write scripts to do this. Its not the same as a reset, but does allow you to effecetively undeploy customisations, by dynamically querying for customisations and build the destructiveChanges.xml file to list things to remove. At Dreamforce 2012 such a tool was presented, the code for it is here. ...


10

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;} .bPageHeader .phHeader TD.searchCell{background-color:green;background-image:none;} .bPageHeader TD.vtop:right{background-color:green;background-image:none;} </style&...


10

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" you can add chrome-users, these are not the same as your gmail account which can be used to sign in to chrome. You'll be able to switch chrome user per window ...


9

As a best practice, you should make your links relative, you can exclude the domain "http://cs7.salesforce.com" and just use "/yourcomponent". Not following this rule is not just an issue when deploying between different environments but also if Salesforce decides to migrate your org to another instance.


9

In addition to sfdcfox pointing out that you generally login to a sandbox at https://test.salesforce.com, there is another option. Since you are using my domain you can login through its URL: Production URL: https://mydomain.my.salesforce.com Sandbox URL: https://mydomain--sandboxName.[Instance].my.salesforce.com. Note that the instance can change when the ...


9

When you do a refresh of the full copy sandbox, all data (including users) will be overwritten. So the 5000 users you've loaded into Sandbox will be wiped out once you refresh from Production, unless you load them into Production first.


9

This is happening for me both on cs18 and cs17. Seemingly random changes allow the test classes to run. Actually they always run, they just report this error anyway. I haven't found a set of random changes that allow the classes to run and for the code to work. For example, if I reference Trigger.new from one of my custom triggers I get the error from ...


9

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 components in two sandbox instances.


9

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 crash at 10,001 ms because the system needs to keep resources available for contending processes, but it might happily run to completion during the midnight ...


9

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 packages. You will have to uninstall the previous one. You cannot overwrite a component which has same API name in production but not part of the package and ...


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