You need to sign in to do that
Don't have an account?

Trigger with specific record type (copy email to case comments)
Hi! I am trying to edit some code to copy an email message to case comments based on specific record types. I have two or three record types to add. I have little coding experience so I understand the logic of what I need to do, just not the actual code. I found code for this trigger & class online and it works great as it stands (for all record types). I found additional code for selecting the record type, which it appears to do, but I have no idea how to add additional record types to the query or what to do after the record type is selected. Can someone help me fill in the blanks? The trigger is CopyEmail and the class is CopyEmailCode. Thanks!
trigger CopyEmail on EmailMessage (after insert) { Id recordTypeId = [Select Id From RecordType Where DeveloperName = 'Salesforce_Support'].Id; /* How do I add a second and third record type of ‘Salesforce_Projects’ & ‘Salesforce_Training’? Then, what else goes here to make it only select the requested record types? */ CopyEmailCode.copyEmail(Trigger.new); }Thanks so much in advance!
Would you mind assisting further with this? I definitely appreciate any further assistance you can provide.
Thanks again,
Melissa