Note: I am new to SF and Apex, and still learning appropriate terminology.
We have a global class (Class_A) that says it "implements Database.Batchable." We've learned that the code can be replaced with formula fields, and would like to delete the class.
There exists Class_B which appears to update a single field on the Accounts and then has the following method:
global void finish(Database.BatchableContext BC) {
Database.executeBatch(new Class_A(), 10);
}
I cannot delete Class_A from production because of the dependency in Class_B. I cannot comment out the method from Class_B because there is a Problem: "Class_B must implement the method: void Database.Batchable.finish(Database.BatchableContext)."
I've decided, I could probably find a way to Flow what's needed for the field update, and then delete Class_B. But, guess what! Class_B is later called in Class_C which is also implements Database.Batchable, and also only has Class_B as its 'finish'. So I cannot delete Class_B until I change Class_C.
Class_C seems to update a number of other things, and this is truly just bringing me down a rabbit hole while I'm trying to fix another problem altogether. A colleague suggested creating a "DoNothingClass" which can temporarily replace the 'finish executiveBatch.' This would allow me to change Class_B, delete Class_A, complete my current project, and then I can get started on the adjustments for Class_B and Class_C.
As I mentioned, I am new to Apex and such, and the appropriate syntax for Batch classes is quite foreign to me. Could someone please assist in the writing of such a class? Could I just comment out the entire class and let it run a blank file?