• JamesRSullivan
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

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

System.VisualforceException: core.apexpages.exceptions.ApexPagesGenericException:  

 

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();

 

 

 

  • February 08, 2010
  • Like
  • 0