+ Start a Discussion
Shahab KhanShahab Khan 

Invalid type Error

i have custom controller with following signature

public with sharing class ScheduleRebillingCycle implements Schedulable


But when i try to instantiate it in other controller like below
ScheduleRebillingCycle ss = new ScheduleRebillingCycle();

It give me error "Invalid type: ScheduleRebillingCycle"

Please somebody help me how i can fix it.

Thanks,
Shahab
 
Balaji Chowdary GarapatiBalaji Chowdary Garapati
Is there any constructor defined in the controller? If so use that signature of that constructor.
Shahab KhanShahab Khan
It has constructor with following

public ScheduleRebillingCycle(List<Rebilling_Cycle__c> cycles, Boolean isBatchFile)

And i have tried following but still same problem

ScheduleRebillingCycle cycle = new ScheduleRebillingCycle(cycleTest, isFromBatchFile);
 
Balaji Chowdary GarapatiBalaji Chowdary Garapati
Can you share the complete code of the controller and the class in which you are trying to call the controller? It helps more in analysing further.

Thanks,
Balaji