I am probably missing something very basic but I can't spot it. I get this error when I try to upload a change set to production:

CaseCommentHandler: Method does not exist or incorrect signature: CaseTriggerHandler.createRecordTypeIdHelper(String) Stack Trace: null


    public class CaseCommentHandler extends TriggerHandler {
       private void caseCommentMethod() {
           id security = CaseTriggerHandler.createRecordTypeIdHelper('Security'); //This is where the deployment fails


public class CaseTriggerHandler extends TriggerHandler {
    public static Id createRecordTypeIdHelper (String input){
        Id tempId = Schema.SObjectType.Case.getRecordTypeInfosByName().get(input).getRecordTypeId();
        return tempId;

The class is working fine on Sandbox and also, when I deployed a cloned version of this change set to another sandbox which was refreshed a few days ago (I run all the local tests), it deployed successfully.

  • Did you actually include both classes? – Adrian Larson Jun 6 '17 at 17:33
  • Everything looks correct to me... Maybe double check whether "Security" is the Name field of the record type, not the DeveloperName. I've often accidentally passed "Car_Manufacturer" in instead of "Car Manufacturer". The user friendly label version is the correct one. But being one word, I imagine they're the same value for your record type. – caleb.breckon Jun 6 '17 at 17:37
  • @AdrianLarson sorry if I wasn't clear. these two classes were already in production. my issue was when I tried to upload a change set that only contained the CaseTriggerHandler out of the two and a few other classes, the error appeared. my workaround was simple, I uploaded a different version of CaseCommentHandler without referencing createRecordTypeIdHelper. But I still want to know why I got this error on the first place. – Json Jun 7 '17 at 19:38
  • @caleb.breckon - I checked it, it's Security but tnx anyway – Json Jun 7 '17 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.