About this question
I have an abstract class called Process that I extend to create a list of processes (List
I've tried something like the following:
String s = 'Account'; List activeProcesses = [SELECT Name FROM Process__c WHERE Active__c = TRUE AND Object__c = :s]; List processNames = Utils.Data.Convert.stringList(activeProcesses, 'Name'); Type t = Type.forName('Process'); List processes = new List(); for(String processName : processNames){ Process p = t.newInstance(processName); processes.add(p); } The error I'm getting when attempting this is: Method does not exist or incorrect signature: [Type].newInstance(String) I really hope the harsh reality isn't that this is just not possible but if it is I need to know that as well, so any insight you have with this question would be greatly appreciated.