Spontaneous Deactivation of Classes and Triggers
If your Apex classes and triggers are all showing as "inactive" in production, here's how to fix it.
- Create a sandbox, but do not set it up in Eclipse
- For each Class and Trigger, click the Edit link and immediately click Save
- This should make the class or trigger "Active" in the sandbox
- Create a project in Eclipse for your sandbox
- Deploy all Classes and Triggers from the sandbox to production
- NOTE: If you create the Eclipse sandbox project BEFORE you make the classes and triggers active, be sure to do a refresh of the sandbox Eclipse project after you've activated the classes & triggers and before you deploy!!
Troubleshooting Tips:
1. If your tests fail in the sandbox:
2. If your tests pass in sandbox, but you get errors when deploying to production:
- Make sure you've configured an Organizational Level custom setting for the Template and Trigger settings.
- Make sure you've added the correct Individual Account ID to the right place in the custom settings.
- Make sure you've added the correct Individual Account Id to the right place in the custom settings in production.
- Make sure the individual account is active in production (for some reason the "inactive" checkbox seems to get checked on DOT installation.)
- Check the trigger metadata in your sandbox to make sure the triggers are, indeed, active (see NOTE in #5 above.)
If all goes well, production should now be good to go.
