function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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