+ Start a Discussion
Guru Vemuru 1Guru Vemuru 1 

How to deploy aplication from Production org to Sandbox?

Hi everyone,
How to deploy application from production to sand box.
please tell me.
Hi Guru,

Are you referring to refresh of sandbox so that all metadata in production get copied to it?
OR deploying a managed package to sandbox?
If that is the case all applications are built ready for deployment via their installation url. Inorder to get the same in SB, we have to install it there as in production but changeing the installtio url first part from https://login.salesforce.com/rest of installation url  to https://test.salesforce.com/rest of installation url
Hi Guru,

I assume you don't have a sandbox.
To create a sandbox:
Setup > Sandboxes > New Sandbox > Enter name & description > Select sandbox type > Select data (for partial/full) > Create

Sandbox types: https://help.salesforce.com/articleView?id=create_test_instance.htm&type=0&language=en_US

If you already have a sandbox:
Setup > Data management > Sandbox > Refresh
When the refresh is finished you will receive an email and you will have to activate the refreshed sandbox

If the answer helps you, please mark it as answered.

Good luck
Amit Chaudhary 8Amit Chaudhary 8
Hi Guru,

If you want to move aplication from Production org to Sandbox. Then you can do below two things
1) You can create new sandbox (https://help.salesforce.com/articleView?id=data_sandbox_create.htm&type=0)
2) Or you can refresh the existing sandbox

Create a Sandbox
  1. From Setup, enter Sandboxes in the Quick Find box, then select Sandboxes.
  2. Click New Sandbox.
  3. Enter a name
  4. Select the type of sandbox you want
  5. Select the data to include in your Partial Copy or Full sandbox
  6. To run scripts after each create and refresh for this sandbox, specify the Apex class you previously created from the SandboxPostCopy interface.
  7. Click Create

Refresing Sandbox :

  You’ll see a list of your sandboxes. Sandboxes that you can refresh have a Refresh link next to the sandbox name.
      Edit | Del | Refresh | Login  Sandboxname    Status(inUse)  

                      On clicking refresh button Salesforce starts copying data to the sandbox(If it is Full sand box)  status turns to Copying.After Salesforce finishes copying data to the sandbox,inProgress turns into Activate button.
    Action                                 Sandboxname          Status

   Edit                                        test                            Copying
   Edit |  Activate |Discard         test                       Replacement ready

              you  need to activate the sandbox before you can use the refreshed data. Salesforce sends you an email when your sandbox is ready to activate. Activating a replacement sandbox that was created using the Refresh link  completely deletes the sandbox it is refreshing. All configuration and data in the prior sandbox copy will be lost, including any application or data changes you have made and there is no way to recover them back.Once Your production organization and its data will not be affected.

 **     Refresh button will be enabled depends the sandbox you refreshed and their limits as mentioned above.
   ex: for full sand box it takes 29 days to enable refresh button.

 **   you can also see the created or refreshed history of sandbox by clicking  history tab on
     sandbox page.

  After Activation of sandbox :
** You will receive a notification email when your newly created or refreshed sandbox has completed copying.

** login URL for Sandbox is https://test.salesforce.com by appending .sandbox_name to their Salesforce usernames.

     Example: username for a production organization is  test@companyname.com,
                      the sandbox is named “test”,
                      new sandbox  user name is test@companyname.com.test.

**   Salesforce automatically changes sandbox usernames, but not passwords.
      you need to use Production password to login sandbox.

**  Newly created sandboxes have the default email deliverability setting System email only.
     The System email only setting is especially useful for controlling email sent from sandboxes
     so that testing and development work doesn’t send test emails to your users

Please let us know if this will help you
Guru Vemuru 1Guru Vemuru 1
Hi every one,
I have a sand box not related to that production org.It is related to other production org. 

In this case how can i do it
Guru Vemuru 1Guru Vemuru 1
Hello TintuB,
In my developer edition there is no option to create sandbox, may be this org doesn't support creation of support.
If yes Please tell me other ways.
Hi Guru,

Related to the developer edition - You can't create sandboxes here.
A sandbox is a copy of an organization. You can't / shouldn't copy from one organization to another's organization sandbox.

If you want to transfer some changes from a developer edition to a sandbox:

Option 1: Create a package in the Developer Edition and deploy it
Option 2: Use Eclipse

If you want to only transfer data: 

Use dataloader or import wizard

The process is complex if you have no training related to this and there is no easy way to explain what you have to do.
You can learn most by doing the following trailhead:

If this answer helps you please mark it as correct

Good luck

Arlind BillaArlind Billa
Hi everybody, How can I write a test for the below code???
List<K8sms.Message> smsList = new List<K8sms.Message>();
if(c.M1_Status__c == 'Merged'){
if(c.Desired_Communication_Channel__c == 'Viber') {
IBOmniMessage m1 = new IBOmniMessage();
m1.toPhoneNumber = c.MobilePhone;
m1.smsText = c.M1_Message_to_Send__c;
m1.viberText = c.M1_Message_to_Send__c;
m1.viberExpiryText = 'IUTE Viber text expired';
m1.viberButtonCaption = 'Go to portal'; //Example. Not used ATM
m1.viberButtonAction = 'www.iutecredit.com'; //Not used ATM
m1.viberImage = ''; //Not used ATM
m1.sendAt = c.M1_Send_Time__c; //Gateway handles the timing
m1.scenarioKey = AppCustomSetting.scenarioKey; //Class holds gateway and app configuration
// Send
String r1 = m1.send();
c.M1_Message_Id__c = m1.messageid;
if (r1.contains('PENDING') ) {
c.M1_Status__c = 'Sent';
else {
c.M1_Status__c = 'Failed';
c.M1_Merge_Body__c = 'Fail status: ' + m1.status;