You need to sign in to do that
Don't have an account?
Hermann Ouré
Error SOQL syntax
Hello,
I am unable to get the correct syntax for my SOQL request
I am trying to request all cases with of a specific record type by using a custom label.
But my syntax is wrong and I cannot quite figure it out.
Thanks
Id caseConcernRecordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByName().get(label.Param_Case_Concern).getRecordTypeId(); Map<Id, Case> caseWithAircallTaskMap = new Map<Id, Case>([SELECT Id, First_Aircall_Logged__c FROM Case WHERE RecordTypeId IN: caseConcernRecordTypeId]);
Map<Id, Case> caseWithAircallTaskMap = new Map<Id, Case>([SELECT Id, First_Aircall_Logged__c FROM Case WHERE RecordTypeId =: caseConcernRecordTypeId]);
IN is used when we have a list to compare.