I have some apex code that has been running since winter '09 and it still works in Winter '10. It consistently fails in Spring '10
The apex code that invokes a visualforce page and then invokes a getContent method to retrieve the PDF that is created by the Visualforce page. It consistently fails in Spring '10 with the following error
Has anyone seen this and have you figured out what to do? Here is a code snippet - it fails on the getContent. I have not heard of any changes that are in Spring '10 that should cause this to fail.
PageReference pdfPage = new PageReference(Page.MyPage.getURL() + '?id=' + quoteId); System.debug('URL for attachment ' + pdfPage.getURL()); System.debug('create new attachment'); //create an attachment //Attach as an Attachment Attachment attachment = new Attachment(); attachment.ParentId = quoteId; attachment.name = 'QuoteSent' + System.now()+'.' + extension; attachment.body = pdfPage.getContent();