[SalesForce] Calling a method with List Ids parameter

I need to test a method in Developer console .

  1. Method is public . So I can test from Dev Console , right?
  2. Since it's a static method , I need to call ClassName.Methodname(Parameters)– This class should be the outermost class or the inner one?
  3. Method signature is public static List<InnerClassName> methodname(List<String> RecorIds) – Can you please give an example of parameter?

I was calling like:

OuterClassName.methodname(id1,id2);

Can anyone please correct me?

Best Answer

List<InnerClassName> innerclassList = new List<InnerClassName>();
List<String> strList = new List<String>();
strList.add(id1);
strList.add(id2);

innerclassList  =OuterClassName.methodname(strList );

hope this will help..

Related Topic