You need to sign in to do that
Don't have an account?
Andrey Vyshinskiy
How do I remove apex trigger from my org?
I trying to remove the following Apex Trigger TasksToOpps from my org. How can I do that? Right now I have no way to remove it or deactivate it.
I would suggest taking following approach,
1) First, go to the sandbox where this Trigger is and DeActivate in Sandbox. Once you find the trigger in sandbox, you will see EDIT button unlike in Production.
2) Once de-activated, make a change set (Go to out-bound change set from quick find search) and then add the trigger as well we the Test classes with it. Upload it.
3) Now, withIn 10 to 20 minutes, you go to the Production => Quick FInd Search for In bound change set and there you will see a ready to deploy the change set.
4) When deploying the change set you will be asked to Run to run test class and so please select the 4th option which is Run Specific test class and then put your test class's API name there.
5) Now, go to the trigger in production and you will see Status = InActive
Hope this helps and if it solves the query then please mark it as best answered!
All Answers
I would suggest taking following approach,
1) First, go to the sandbox where this Trigger is and DeActivate in Sandbox. Once you find the trigger in sandbox, you will see EDIT button unlike in Production.
2) Once de-activated, make a change set (Go to out-bound change set from quick find search) and then add the trigger as well we the Test classes with it. Upload it.
3) Now, withIn 10 to 20 minutes, you go to the Production => Quick FInd Search for In bound change set and there you will see a ready to deploy the change set.
4) When deploying the change set you will be asked to Run to run test class and so please select the 4th option which is Run Specific test class and then put your test class's API name there.
5) Now, go to the trigger in production and you will see Status = InActive
Hope this helps and if it solves the query then please mark it as best answered!
An easy way to do this is as follows:
- Use an IDE to create a new project and download all classes from production.
- In the class you want to delete, open the metadata file and change the status of the class to "deleted".
- Save to the server.
Observe the status of the class in the example below: You should try this in the sandbox and become comfortable with it before attempting it in production. Double-check the class name before deleting.For more information may I suggest you please check with below links from the stack exchange community which will help you accelerate further with the above requirement?
- https://help.salesforce.com/articleView?id=000006188&type=1
Please let us know if you have any further queries.Mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
Absolutely it's possible to delete the trigger from the production.
Options 1 : Force.com IDE
Options 2: -Using ANT
Construct your destructiveChanges.xml file and Run the ANT