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
jaamsjaams 

How to import Trigger from sandbox

Hi there,

Can anybody help me in impoerting a custom case trigger from sandbox to production.

pankaj.raijadepankaj.raijade

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.

jaamsjaams

any help how to do that by any of these way

Hugo_BHugo_B

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.

Sridhar BonagiriSridhar Bonagiri

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.

 

NiketNiket

In order to deploy a trigger from sandbox to production, you need to take care of some points :

 

  1. you must have a test class for the trigger  with 75% or more test coverage.
  2.  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.
  3. You need to create a deployment connection (If you are using change set).
  4. Create an Outbound changeset in sandbox and add the trigger and its Test class to change set.
  5. Create an Inbound change set in Production.
  6. In production, validate deployment and if it is successful, then deploy it .

 

 

Please let me know if you need more explanation.

 

Cheers !

Niket

Certified Developer | Certified Administrator

MyBlog