Triggers must first have an accompanying test class which meets the 75% code coverage requirement (I think it's 75% :O) . Then you must deploy the trigger, along with the test classes in an outbound change set from Sandbox to Production. Until all tests meet the code coverage you cannot deploy a trigger.
In order to deploy a trigger from sandbox to production, you need to take care of some points :
you must have a test class for the trigger with 75% or more test coverage.
At the time of deployment, 'Run All Test' is performed in Production automatically. So there must be no test failure and less code coverage in Production.
You need to create a deployment connection (If you are using change set).
Create an Outbound changeset in sandbox and add the trigger and its Test class to change set.
Create an Inbound change set in Production.
In production, validate deployment and if it is successful, then deploy it .
There are many options,
Like using change sets, using eclips, or you can ANT tools as well
The change sets looks easiest way to achive functionaliy.
Regards,
Pankaj Raijade.
any help how to do that by any of these way
Triggers must first have an accompanying test class which meets the 75% code coverage requirement (I think it's 75% :O) . Then you must deploy the trigger, along with the test classes in an outbound change set from Sandbox to Production. Until all tests meet the code coverage you cannot deploy a trigger.
Hi,
You can import Triggers from Sandbox to Production throught changeset or using Eclipse,
Through Eclipse first you need to get that trigger to your local machine and deploy to server.
But one thing to remember while deploying you need to have 75% code coverage for this trigger in a test class.
In order to deploy a trigger from sandbox to production, you need to take care of some points :
Please let me know if you need more explanation.
Cheers !
Niket
Certified Developer | Certified Administrator
MyBlog