{"id":598,"date":"2014-07-04T12:14:31","date_gmt":"2014-07-04T12:14:31","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/salesforce\/?p=598"},"modified":"2018-08-22T10:11:43","modified_gmt":"2018-08-22T10:11:43","slug":"dependent-class-is-invalid-and-needs-recompilation-error","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/07\/04\/dependent-class-is-invalid-and-needs-recompilation-error\/","title":{"rendered":"Dependent class is invalid and needs recompilation error"},"content":{"rendered":"<p>We had a trigger active and working fine for the past one year. This trigger would create a task and opportunity; as well as send an email based on certain business rules when the customer gave any kind of feedback online at the Salesforce portal.<\/p>\n<p>Some days back, we started getting the following error:<a href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/07\/Dependant-class-invalid-error.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-599\" src=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/07\/Dependant-class-invalid-error.jpg\" alt=\"Dependant class invalid error\" width=\"817\" height=\"142\" \/><\/a>This was quite a shock for all of us, as this was thoroughly tested and had proven to be working exactly in sync with the logic for the past one year. On investigating the cause, we found that one of the classes being \u201creferred to\u201d in this whole process was modified.<\/p>\n<p>This is how we resolved this issue:<a href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/07\/Apex-compile-all-classes.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-600\" src=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/wp-content\/uploads\/2014\/07\/Apex-compile-all-classes.jpg\" alt=\"Apex compile all classes\" width=\"662\" height=\"261\" \/><\/a><\/p>\n<p>Navigate to Setup -&gt;Build -&gt; Develop-&gt; Apex Classes. Click the link \u201cCompile All Classes\u201d. This will compile all the classes in your organization. After recompilation, the trigger started working as usual again.<\/p>\n<p>Happy Coding!<\/p>\n<p><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=\"Adding flags to records in an object\" href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/06\/30\/adding-flags-to-records-in-an-object\/\" target=\"_blank\" rel=\"noopener\">Adding flags to records in an object<\/a><\/li>\n<li><a title=\"View all currently active sessions in a Salesforce Organization\" href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/06\/30\/view-all-currently-active-sessions-in-a-salesforce-organization\/\" target=\"_blank\" rel=\"noopener\">View all currently active sessions in a Salesforce Organization <\/a><\/li>\n<li><a title=\"Delete multiple records from custom object in Salesforce\" href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/06\/03\/delete-multiple-records-from-custom-object-in-salesforce\/\" target=\"_blank\" rel=\"noopener\">Delete multiple records from custom object in Salesforce<\/a><\/li>\n<li><a title=\"Freezing Salesforce users\" href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/06\/02\/freezing-salesforce-users\/\" target=\"_blank\" rel=\"noopener\">Freezing Salesforce users<\/a><\/li>\n<li><a title=\"Prevent page redirection on Apex Command Button through JavaScript\" href=\"http:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/05\/27\/prevent-page-redirection-on-apex-command-button-through-javascript\/\" target=\"_blank\" rel=\"noopener\">Prevent page redirection on Apex Command Button through JavaScript<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We had a trigger active and working fine for the past one year. This trigger would create a task and opportunity; as well as send an email based on certain business rules when the customer gave any kind of feedback online at the Salesforce portal. Some days back, we started getting the following error:This was\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/salesforce\/2014\/07\/04\/dependent-class-is-invalid-and-needs-recompilation-error\/\">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":[14,49,90,615,501],"class_list":["post-598","post","type-post","status-publish","format-standard","hentry","category-salesforce-srv","tag-apex-classes","tag-compilation","tag-dependant-class","tag-salesforce-dependent-class","tag-trigger"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/598","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=598"}],"version-history":[{"count":2,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/598\/revisions"}],"predecessor-version":[{"id":4055,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/posts\/598\/revisions\/4055"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/media?parent=598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/categories?post=598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/salesforce\/wp-json\/wp\/v2\/tags?post=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}