0

Class.BatchCarrierUpdate.execute: line 59, column 1

            Boolean toUpdate = false;
            for(String strFieldName : caseToCarrierUpdatedFieldMap.keySet()){
                System.debug('****** CaseNumber: '+c.CaseNumber+'Case field: '+strFieldName+'  Value: '+c.get(strFieldName));
                System.debug('****** CaseNumber: '+c.CaseNumber+'CUD field: '+ caseToCarrierUpdatedFieldMap.get(strFieldName).CarrierUpdateField__c +'  Value: '+cud.get(caseToCarrierUpdatedFieldMap.get(strFieldName).CarrierUpdateField__c));
                if(c.get(strFieldName) != cud.get(caseToCarrierUpdatedFieldMap.get(strFieldName).CarrierUpdateField__c)){
                    c.put(strFieldName,cud.get(caseToCarrierUpdatedFieldMap.get(strFieldName).CarrierUpdateField__c));
                    toUpdate = true;
                }
            }

            if(toUpdate){
                casesToUpdate.add(c);
            }

Somewhere amongst this code is something creating an error, line 59 which is where the first sysem.debug starts.

  • 1
    Check caseToCarrierUpdatedFieldMap, if it contains category – Pranay Jaiswal Mar 12 at 10:04
  • My custom settings have all of the required fields there, that's why I'm scratching my head a bit – Harry Smith Mar 12 at 10:08
  • There is no field named as category on case. Do you mean to put Category__c – Pranay Jaiswal Mar 12 at 10:09
  • That's the reason for the error but I don't see where you see this mistake. – Harry Smith Mar 12 at 10:15
  • On line 5 and 6, you tryin to access and put values in case using c.get put for the fields that does not exists – Pranay Jaiswal Mar 12 at 10:16

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.