I am currently trying to have a PDF created based on a field update.
The issue is that it seems that getContent() and getContentAsPDF() don't work when called within a trigger.
Does anyone know a work around for this or is this something that I won't be able to accomplish.\
FromName = email.fromName,
ToAddress = email.toAddresses,
Subject = email.subject,
TextBody = email.plainTextBody,
HtmlBody = email.htmlBody,
ParentId = newCase.Id,
ActivityId = newTask.Id)); // (newCase and newTask are the newly created case and task from earlier code)