{"id":761,"date":"2014-11-29T14:54:24","date_gmt":"2014-11-29T14:54:24","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/salesforce\/?p=761"},"modified":"2025-06-20T06:43:11","modified_gmt":"2025-06-20T06:43:11","slug":"delete-apex-class-or-trigger-in-salesforce-production-org","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/11\/29\/delete-apex-class-or-trigger-in-salesforce-production-org\/","title":{"rendered":"Delete apex class or trigger in Salesforce Production Org"},"content":{"rendered":"<p>It is not possible to directly delete an Apex class or trigger after it has been deployed to production. A quick workaround to delete or disable Apex Class\/Trigger is by using eclipse and Force.com IDE.<\/p>\n<p>Here are the steps \u2013<\/p>\n<ol>\n<li>Download Force.com IDE.<\/li>\n<li>Connect to the salesforce production org.<\/li>\n<li>Download the apex class\/trigger.<\/li>\n<li>Open the XML file of the Apex class\/trigger.<\/li>\n<li>Change the status of the Apex class\/trigger to Deleted.<\/li>\n<li>Save and deploy to server.<\/li>\n<\/ol>\n<p>Note \u2013 Apex class status can only be changed to \u201cActive\u201d or \u201cDeleted\u201d and not \u201cInactive\u201d.<a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/11\/Trigger1.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-765\" src=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/11\/Trigger1.png\" alt=\"Trigger\" width=\"798\" height=\"252\" \/><\/a><br \/>\n<span style=\"font-size: Medium;\"><strong>About Us<\/strong><\/span><br \/>\n<a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offers Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that requires apex code incorporation into the Salesforce platform.<\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a> has some unique solutions for Cloud CRM such as Salesforce integration with <a href=\"https:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\">Sage Enterprise Management (Sage X3<\/a>), Sage Intacct, <a href=\"https:\/\/www.greytrix.com\/product\/sage-100-erp\/gumu-100-salesforce-integration\">Sage 100 <\/a>and <a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp\/gumu-300-salesforce-integration\">Sage 300 (Sage Accpac)<\/a>. We also offer best-in-class Cloud CRM <a href=\"https:\/\/www.greytrix.com\/product\/crm-development\/salesforce-com\">Salesforce customization and development services<\/a> along with services such as Salesforce <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/data-migration-services\">Data Migration<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/integrated-application-development\">Integrated App development<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/custom-development\">Custom App development<\/a> and <a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/maintenance-support\">Technical Support<\/a> to business partners and end users.<\/p>\n<p>Greytrix GUMU&#x2122; integration for Sage ERP \u2013 Salesforce is a 5-star app listed on <a href=\"https:\/\/appexchange.salesforce.com\/listingDetail?listingId=a0N30000000psM5EAI\" target=\"_blank\" rel=\"noopener\">Salesforce AppExchange<\/a>.<\/p>\n<p>For more information, please contact us at <a href=\"mailto:salesforce@greytrix.com\">salesforce@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n<p><strong><span style=\"font-size: Medium;\">Related Posts<\/span><\/strong><\/p>\n<ul>\n<li><a title=\"Quick way to find out the release of Salesforce Instance\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/11\/29\/quick-way-to-find-out-the-release-of-salesforce-instance\/\" target=\"_blank\" rel=\"noopener\">Quick way to find out the release of Salesforce Instance<\/a><\/li>\n<li><a title=\"Quick way to find edition of Salesforce\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/11\/29\/quick-way-to-find-edition-of-salesforce\/\" target=\"_blank\" rel=\"noopener\">Quick way to find edition of Salesforce<\/a><\/li>\n<li><a title=\"Invoke Future Methods through Apex Trigger for web service callout\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/10\/30\/invoke-future-methods-through-apex-trigger-for-web-service-callout\/\" target=\"_blank\" rel=\"noopener\">Invoke Future Methods through Apex Trigger for web service callout<\/a><\/li>\n<li><a title=\"DateTime field and Time Zone Settings\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/10\/30\/datetime-field-and-time-zone-settings\/\" target=\"_blank\" rel=\"noopener\">DateTime field and Time Zone Settings<\/a><\/li>\n<li><a title=\"Send email from Apex\" href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/09\/24\/send-email-from-apex\/\" target=\"_blank\" rel=\"noopener\">Send email from Apex<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>It is not possible to directly delete an Apex class or trigger after it has been deployed to production. A quick workaround to delete or disable Apex Class\/Trigger is by using eclipse and Force.com IDE. Here are the steps \u2013 Download Force.com IDE. Connect to the salesforce production org. Download the apex class\/trigger. Open the\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/11\/29\/delete-apex-class-or-trigger-in-salesforce-production-org\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[13,14,21,589,502],"class_list":["post-761","post","type-post","status-publish","format-standard","hentry","category-salesforce-srv","tag-apex","tag-apex-classes","tag-apex-trigger","tag-delete-apex-class","tag-trigger-in-salesforce"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":3,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/761\/revisions"}],"predecessor-version":[{"id":10980,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/761\/revisions\/10980"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/categories?post=761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/tags?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}