Trying to deploy from one Sandbox to another but I get the following error:
Here is my code:
Trigger Chat_GetOsForLiveAgent on LiveChatTranscript (before insert) {
List<GettingOS__c> customSettings = GettingOS__c.getall().values();
List<Case> lstcases = new List<Case>();
System.debug('customSettings: ' + customSettings);
for(LiveChatTranscript trans: Trigger.new) {
if(trans.UserAgent!=null) {
for(GettingOS__c cs: customSettings){
if(trans.UserAgent.contains(cs.AbbrivOS__c)) {
Case c = new Case(Id=trans.CaseId,OS__c=cs.Operating_System__c);
lstcases.add(c);
}
}
}
}
update lstcases;
}