Ask Search:
m sm s 

Apex code move from Sand Box to Production ?

Hi All

I have written a trigger on my Orgs Sand box .Now I want to move this code in my production Orgs.

How can I do that ?

Kindly Suggest.

Thanks in Advance.

Regards
MS
Best Answer chosen by Moderator (salesforce.com) 
System AdministratorSystem Administrator
MS,

You will have to write a test class initially to test the trigger which you have written. If the code coverage is over 75% then you are ready for deploying it in production. To deploy your trigger in production, Click on Setup --> Deploy --> Outbound ChangeSets and create a new change set. Here you will have to select your production org, your trigger and test class together and then click on upload. Upload will take between 1-15 minutes of time. Once the upload is complete, get into your production org and follow this path Setup --> Deploy --> Inbound ChangeSets. Here you select the change set uploaded in sandbox and click on deploy.

Hope this helps.

Regards
Varun Nagpal
KVP Business Solutions
varun@kvpcorp.com

All Answers

System AdministratorSystem Administrator
MS,

You will have to write a test class initially to test the trigger which you have written. If the code coverage is over 75% then you are ready for deploying it in production. To deploy your trigger in production, Click on Setup --> Deploy --> Outbound ChangeSets and create a new change set. Here you will have to select your production org, your trigger and test class together and then click on upload. Upload will take between 1-15 minutes of time. Once the upload is complete, get into your production org and follow this path Setup --> Deploy --> Inbound ChangeSets. Here you select the change set uploaded in sandbox and click on deploy.

Hope this helps.

Regards
Varun Nagpal
KVP Business Solutions
varun@kvpcorp.com
This was selected as the best answer
m sm s
Thanka a ton Varun.

Steve FouracreSteve Fouracre
It is actually possible to deploy when below 75% for an individual object, but everything it touches on average must be over 75%.

Also try using Eclipse, normally for deploying this is better than Change sets, but there are trade offs for both options. You will also need the Force.com ide plugin