You need to sign in to do that
Don't have an account?
gidiem
Rename trigger in production
When we pushed a trigger to production it didn't have the naming convention we desired. Is it possible to change the name? I found this article but it doesn't inspire enough confidence to deploy a second trigger to production in case I make the situation worse having 2 triggers. I followed every step but I don't want to push it in case they are wrong. In addition, I do understand triggers can be deactivated and deleted but I do not want to go that route due to time restrictions. Thanks in advance.
Article: https://salesforce.stackexchange.com/questions/21219/how-to-rename-a-trigger
Article: https://salesforce.stackexchange.com/questions/21219/how-to-rename-a-trigger
All Answers
- Comment out the code within the existing trigger on the sandbox and deploy the same code to your Salesforce production instance. This will deactivate the existing code and render the old trigger as inactive.
- Copy paste the same code from the Sandbox to create a new Apex Trigger with the expected naming convention.
- Deploy the newly created Apex trigger in step # 2 which contains the expected business logic.
- You can then use the Force.com IDE or a destructive changes using ANT to delete the old trigger code from step # 1
This way you mitigate the risk of having 2 Apex triggers existing which could possibly produce unexpected results as well as having unwanted obsolete code doing nothing. Unfortunately this is the only way to overcome the outlined issue.Please DO NOT forget to mark this thread as SOLVED if this answer helps reoslve your issue.