You need to sign in to do that
Don't have an account?

Error: Compile Error: Method does not exist or incorrect signature: void runEligibilityCheck() from the type Eligibility at line 4 column 15
What i'm trying to achive:
Simply call a class from a trigger when checkbox is checked and lead record is saved.
Error message:
Error: Compile Error: Method does not exist or incorrect signature: void runEligibilityCheck() from the type Eligibility at line 4 column 15
Simply call a class from a trigger when checkbox is checked and lead record is saved.
Error message:
Error: Compile Error: Method does not exist or incorrect signature: void runEligibilityCheck() from the type Eligibility at line 4 column 15
// My Class global with sharing class Eligibility { // Code here private static String runEligibilityCheck(String patientID) { // More code in my method } }
// My Trigger. Trigger CheckEligiblityUponSelfSchedule on Lead (before update, before insert) { for (Lead l: Trigger.new) { if(l.self_scheduled__c = TRUE){ Eligibility.runEligibilityCheck(); } } }
// My Class
global with sharing class Eligibility {
// Code here
public static String runEligibilityCheck(String patientID) {
// More code in my method
}
}
Additionally, You pass parameter to runEligibilityCheck in trigger.
// My Trigger.
Trigger CheckEligiblityUponSelfSchedule on Lead (before update, before insert) {
for (Lead l: Trigger.new) {
if(l.self_scheduled__c = TRUE){
Eligibility.runEligibilityCheck(l.Id);
}
}
}
Please mark it best if it helps you. Thanks.