function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Eddie DeveauEddie Deveau 

Apex Class Commented Out Pushed to Prod Error

Hello, I am no developer, but I am trying to turn off an existing apex class by just commenting it out. I'm able to do that, and when I push it into production, I keep getting an error realted to the actual apex class: 

System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found.: []
Stack Trace: Class.NewcostsheetwithapprovalTest.testallmethodwithNoInitialvaluesET: line 563, column 1

Any suggestions on removing the error?

First line of apex class: 

public class NewcostsheetwithapprovalTest
{    
/*
  
Abhishek BansalAbhishek Bansal
Hi Eddie,

As per the error, it is clear that the complete code is not commented out and there is something whihc is being executed. Please make sure the complete code is commented out.
If you need any immediate help, please reach out to me:
Email: abhibansal2790@gmail.com
Skype: abhishek.bansal2790

Thanks,
Abhishek Bansal.
AbhishekAbhishek (Salesforce Developers) 
First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process was found". I did not meet the entry criteria for an approval process. A role that uses this approval process was not in the public group in the entry criteria.

For reference, you can check this,
https://www.reddit.com/r/salesforce/comments/6i0lft/approval_process_restricting_approver_from/

If it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks.
Eddie DeveauEddie Deveau
Thank you both, so I was able to figure that part. Now I'm getting an insufficient code coverage issue. However, I'm just trying to turn off an existing Apex Class and Trigger in the org, so regarding the code coverage, I'm wondering if there is some simple code I could just put on either of them to get it to work?