I am new to Salesforce development and I am trying to practice by creating a list of strings deriving from another list of object records created from a query. My code is the following....
public class ProjectStatus{
public static void Test(List<String> myArray) {
for (List<pse__Proj__c> projects : [SELECT Id FROM pse__Proj__c WHERE Project_Status_Requirement__c = True LIMIT 1000]) {
myArray.add(String.valueOf(projects));
}
System.debug(myArray);
}
}
After attempting to run in the Anon window, I receive the following error...
Method does not exist or incorrect signature: void Test() from the type ProjectStatus
I ran the following code in the Anon Exec window...
ProjectStatus.Test();
Could anyone help me identify why this error is being thrown? This is probably a simple beginner's mistake but after spending a lot of time researching and editing my code I am still unsuccessful so I am hoping someone here may be able to add some input, thanks in advance!