I have a Apex Class which is having a issue when I am deploying via Package. When I save the class in Developer Console it is not a issue, but due to this my CICD is not working and I need to resolve this.
I am calling a method like this:
record.Date_time_Registration_Response_Provided__c = IDRCaseActionsHelper.populateAfcaRegistrationResponseDate(
oldRecord,
record
);
and this method is implemented as follows:
/**
* @description Populate Date/time Registration Response Provided when AFCA Registration Response Provided is checked
* @param oldRecord old Record of pre-update cases supplied from the trigger as well
* @param newRecord new Record of cases from the trigger
* @return DateTime
*/
public static DateTime populateAfcaRegistrationResponseDate(
Case oldRecord,
Case newRecord
) {
if (
oldRecord.IDR_AFCA_Registration_Response_Provided__c ==
newRecord.IDR_AFCA_Registration_Response_Provided__c
) {
return newRecord.Date_time_Registration_Response_Provided__c;
}
if (!newRecord.IDR_AFCA_Registration_Response_Provided__c) {
return newRecord.Date_time_Registration_Response_Provided__c;
}
return DateTime.now();
}
I am getting following error
Method does not exist or incorrect signature: void populateAfcaRegistrationResponseDate(Case, Case) from the type CLASSNAME
now I don't get why it is searching or void when I need it as DateTime type only....