1

forEach works only on arrays, but you are returning an object. Your code is: global static InnerClass getMethod(){ InnerClass c = new InnerClass(); return c; } I think you need something like this. global static List<InnerClass> getMethod(){ //... } Also please confirm if really you need global access for the method, the public should be ...


Only top voted, non community-wiki answers of a minimum length are eligible