function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mdelgadomdelgado 

Moving configuration and data from a sandbox environment to a production environment

Hi,

 

I am new to salesforce, I currently have 2 salesforce environments, a sandox and a production environment.  What are the best practices for:

 

1) Moving from configuration data from a sandbox to a production environment?  Does Salesforce provide any tools?

2) Moving actual data from the same?

 

thanks for your help,

 

Mirko

Best Answer chosen by Admin (Salesforce Developers) 
IspitaIspita

1.In ecllipse, in the project navigator window when you go to the folder for classes and right click you get the option"Force.com" below it you will be provided the option "run all Tests" it will run the all test methods.

2. Yes the unit tests are executewd at the time of deployment.

 

 

All Answers

IspitaIspita

The common tool used for deployment is the Java IDE having the Salesforce  plugin called Ecllipse.

 In case you want to find in detail about this IDE refer to the links below:-

Also if you deploy to a production organization:

  • 75% of your Apex code must be covered by unit tests, and all of those tests must complete successfully.

Note the following:

  • When deploying to a production organization, every unit test in your organization namespace is executed.
  • Calls to System.debug are not counted as part of Apex code coverage in unit tests.
  • While only 75% of your Apex code must be covered by tests, your focus shouldn't be on the percentage of code that is covered. Instead, you should make sure that every use case of your application is covered, including positive and negative cases, as well as bulk and single record. This should lead to 75% or more of your code being covered by unit tests.
  • Every trigger has some test coverage.
  • All classes and triggers compile successfully.

Hope this helps.

sfdcfoxsfdcfox

To move configuration data from Sandbox to Production, you can use Change Sets, Packages, the Metadata Toolkit (e.g. Ant scripts), and the Force.com Eclipse IDE. To move actual data, you can use the Import Wizards (for some data types) or the Apex Data Loader (for virtually all data types). Note that moving record data may require mapping Sandbox record IDs to Production record IDs, depending on if the data originated in Sandbox or not.

Sridhar BonagiriSridhar Bonagiri

 

Hi,

 

You can move configuration data from sandbox to production through eclipse or change sets.

 

eclipse is a force.com IDE 

 

Changesets is a feature of Salesforce.com

 

Sridhar Bonagiri

mdelgadomdelgado

All,

 

Thanks for your replies.  I have a followup question.

 

I was able to install the IDE and get my configuration in eclipse.  I had the following questions

 

1) How do I go about executing the unit tests?

2) Are the unit tests executed when I go to deploy back to salesforce?

 

If there are any guides that provide this information it will be helpful to me.

 

thanks,

 

Mirko

IspitaIspita

1.In ecllipse, in the project navigator window when you go to the folder for classes and right click you get the option"Force.com" below it you will be provided the option "run all Tests" it will run the all test methods.

2. Yes the unit tests are executewd at the time of deployment.

 

 

This was selected as the best answer