Skip to main content

Changed behaviour on Type.forName

David Martin avatar
Written by David Martin
Updated yesterday

Salesforce has changed the behaviour of the Type.forName Method. Using an invalid namespace while calling the Type.forName() method now returns null.

Previously, Apex allowed you to specify an invalid namespace such as Type.forName('InvalidNamespace', 'OuterClass.InnerClass') or use an outer class as a namespace such as Type.forName('OuterClass', 'InnerClass') with indeterminate results.

Additional Resources

  • Apex

Did this answer your question?