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
lodoss118lodoss118 

can you create triggers in production environment?

Hi at the moment if i try to create triggers or any code there is no new button in our live salesforce account. I created a sandbox project and now i can create the triggers but how do i put these changes in the live system, please help.
Ron HessRon Hess
There is a deployment process, actually 2 processes, one using ANT tasks, and another using Eclipse.
Details can be found here in the Apex Code documentation
http://www.salesforce.com/us/developer/docs/apexcode/index.htm

search for Deploy
JasonRogersJasonRogers
And that document is woefully inadequate!!  I just found the answer (after an hours of trying this and that, reading docs, reading the code in the include JAR file from the ant tool zip file).

You have to have your classes in a directory called Classes and your Triggers in a directory called Triggers.  It doesn't work otherwise.  Also, specifying 'runTests all="true"' didn't pick up the classes and triggers from my local dir, it only ran tests for classes that were already compiled in Salesforce.
JasonRogersJasonRogers
Sorry, that should have said:
  'runTests alltests="true"'
Ad_InfosysAd_Infosys
HI,
 
We have succesfully deployed trigger codes in production environment using ANT deployment tool. It works fine if you are able to crack the test coverage section. establisihing the setup has to followed as per the guide suggested above.
For deployment test coverage should be 75% atleast...