You need to sign in to do that
Don't have an account?
Skeeter
trigger comparison argument must be of compatible type
I'm having issues with my trigger when I'm trying to pull 2 different record types. I should pull either the customersupport case record type or customer_service record type for the support cases.
Comparison arguement must be of compatible types (Id,RecordType)
Any help is greatly appreciated.
Comparison arguement must be of compatible types (Id,RecordType)
Any help is greatly appreciated.
trigger ContactSupportSurveyDates on Case (before update) { Case[] oldvalue = trigger.old; Case[] newvalue = trigger.new; Integer i=0; Map<ID,RecordType> rt_Map = New Map<ID,RecordType>([Select ID, Name From RecordType Where sObjectType = 'Case']); for (Case c : trigger.new) { if (oldvalue[i].Survey_Date__c <> newvalue[i].Survey_Date__c) { Contact t = [select Id,Last_Support_Survey_Date__c,Last_Implementation_Survey_Date__c from Contact where Id =:c.ContactId limit 1]; if (c.RecordTypeId == rt_Map.get('Customer_Service') || c.RecordTypeId == rt_Map.get('CustomerSupport')) //support case id { t.Last_Support_Survey_Date__c = c.Survey_Date__c; update t; } if (c.RecordTypeId == rt_Map.get('Pharmacy_Implementation')) // implementation case id { t.Last_Implementation_Survey_Date__c = c.Implementation_Survey_Date__c; update t; }}}}
Try with below code it will help !!
If it help mark as solution to help other .
Thanks
Manoj
Please set debug log add below code to your triggger and post the log ,as per my knowledge if the condition you have added in your trigger code is correct then it should work .
Incase anny issue posting your code send your log to my email .(manojjena20@gmail.com)