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
alexjalexj 

deployement from sandbox to production

Hi, I have developped an appex class with this test class. My code is correctly covered and the work suits me. I would like deploy this class on my production.The developpment is on my sandbox.

I haven't found a clear documentation about deployement from sandbox to production. what is the different steps?

 

Thank you for your help,

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

 

Follow the below steps:

 

1. Download Eclipse from this site.

http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/ganymedesr2

2. Go to this page and follow the instructions for installing the Force.com IDE within Eclipse. http://wiki.developerforce.com/index.php/Force.com_IDE_Installation_for_Eclipse_3.4.x

3. After Eclipse restarts, go to the File menu and create a new Project. Select a Force.com project.

4. Enter your login credentials including security token. Don’t forget to add the .sandbox_name after your username to access your sandbox.

5. Select to download all Apex and Visualforce data from your sandbox.

6. In the Package Explorer window on the left, expand the tree under the “src” folder, then expand again under “triggers”.

7. Select your trigger.

8. Click on the fourth button over in the toolbar at the top, deploy to server.

9. Enter your login credentials for your production environment and follow the instructions.

 

Note: The first time I tried this, I got an error than the trigger could not be deployed because I did not have adequate test coverage. You need to create a simple test class that runs functions to test your trigger code before deploying, I did know this before running into it. Your test class needs deployed to production before you deploy the trigger.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

All Answers

Navatar_DbSupNavatar_DbSup

Hi,

 

Follow the below steps:

 

1. Download Eclipse from this site.

http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/ganymedesr2

2. Go to this page and follow the instructions for installing the Force.com IDE within Eclipse. http://wiki.developerforce.com/index.php/Force.com_IDE_Installation_for_Eclipse_3.4.x

3. After Eclipse restarts, go to the File menu and create a new Project. Select a Force.com project.

4. Enter your login credentials including security token. Don’t forget to add the .sandbox_name after your username to access your sandbox.

5. Select to download all Apex and Visualforce data from your sandbox.

6. In the Package Explorer window on the left, expand the tree under the “src” folder, then expand again under “triggers”.

7. Select your trigger.

8. Click on the fourth button over in the toolbar at the top, deploy to server.

9. Enter your login credentials for your production environment and follow the instructions.

 

Note: The first time I tried this, I got an error than the trigger could not be deployed because I did not have adequate test coverage. You need to create a simple test class that runs functions to test your trigger code before deploying, I did know this before running into it. Your test class needs deployed to production before you deploy the trigger.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

This was selected as the best answer
SRKSRK

IN App Setup   under Deploy there are standered  Outbound Change Sets  &  Inbound Change Sets  servie provied by salesfroce for deployment u can use that & help reagrding them is provied of that detail page of respative options

prady-cmprady-cm

There are 2 ways of doing it

 

1. use eclipse

2. From the UI

 

Eclipse :

 

1. mark the files you want to move to production rightclick ->force.com->Deploy to server

 

You will get another dialog window to enter your credentials and security token

choose the directory in the next screen, then you would get a screen with the files you are moving the server and click on the validate button. this would give you an result on whether you the move would suceed.

click again on next to complete the move to production.

 

Note: I just wrote this on the fly, so there might be some changes in the way screen comes up. But should more or less be the same.

 

From UI

 

Go to setup

on the left

App Setup -> Deploy-> outbound change sets

Click on new button , give it a name and save

under the add change set components click on Add

 

Choose the componenet type and find the clasees or pages you want to move.

once you have selected the components to move  click on Add change set

 

click on  the upload button once you have all the componets to be moved

 

Go to production env

App Setup -> Deploy-> inbound change sets

under change set awaiting deployment

you can find the change set you had uploaded.. This may take upto 5- 10 mins in some cases.

click on the change set , validate it and deply it

 

Hope this helps

 

 

 

alexjalexj

Thank you for your answer.

I try your solution but for the moment I have a problem with the plugin Force.com installation.