I have an implementation where i'm storing class name in custom metadata & trying to instantiate the class in apex using Type.forName
but getting:
Method does not exist or incorrect signature: void forName(String) from the type String
The line causing this issue is something like this
list<customMetadata__mdt> result = [SELECT MasterLabel,Id,ClassName__c FROM customMetadata__mdt];
Type classname=Type.forName(result[0].ClassName__c);
type
? Do you have an Apex class anywhere in your org calledType
?