1

Hi this is my schedulable class here i'm calling my apex class but it shows

Error: Compile Error: Invalid type: Service at line 6 column 34

global class SchedulingService implements Schedulable {

   global void execute(SchedulableContext sc) {

          Service s = new Service(); 
         // b.getIncident();method in my apex class
          //database.executebatch(b);
   }
}

please help me to resolve

Thanks

3
  • 1
    Suresh, can you please post first line of "Service" class?
    – Ashwani
    Mar 30, 2017 at 11:48
  • thanks for replying.Service is my apex class how can i put __c as extension Ashwani
    – suresh
    Mar 30, 2017 at 11:51
  • You don't need __c for a class. Looks like you want to instantiate an object. Error on that line suggests its looking for a class which does not exists.
    – Raul
    Mar 30, 2017 at 11:59

1 Answer 1

0

You have to define Service first. Then only you can use it in Scheduler.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .