Can someone help us. We are wondering why cloning of email thread from one case to another didn't work in Lightning. But it works well with Salesforce classic.

In lightning it give us an error.

Operation is not allowed.enter image description here

Please see our trigger:

 `for(EmailMessage emailRec :emailRecList){
        for(Case caseRec : caseRecList){
                EmailMessage emailRecNew = new EmailMessage();
                emailRecNew.ParentId = emailRec.Transfer_to_Case__c;
                caseRec.Attach_Email__c = TRUE;
    } `

Thanks for your help.


  • Have you checked the logs to see more information about the error you are getting? – Dan Kowalski Jun 19 '17 at 14:44
  • Hi @DanKowalski we checked the logs and try to do debug on our trigger and it is all good. – lone Jun 20 '17 at 6:32
  • When does your trigger trigger fire? Meaning is it before insert/update or after insert/update? – Dan Kowalski Jun 21 '17 at 14:36
  • Hi @DanKowalski trigger fires after update. – lone Jun 28 '17 at 9: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.