• daffentranger
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Does APEX allow the ability to use the Query More operation in a dynamic way?  

 

I am able to use the querymore functionality via a for loop with a select statement however if I try and replace my select statement with a dynamic database.query I can't get it to work.  For example  I need something like below to work.  Any ideas?

 

 

String s = 'SELECT ID FROM PRODUCT2'; for (Product2 p: Database.query(s)) { // do something }

 

 

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

Does APEX allow the ability to use the Query More operation in a dynamic way?  

 

I am able to use the querymore functionality via a for loop with a select statement however if I try and replace my select statement with a dynamic database.query I can't get it to work.  For example  I need something like below to work.  Any ideas?

 

 

String s = 'SELECT ID FROM PRODUCT2'; for (Product2 p: Database.query(s)) { // do something }

 

 

The search lookup box is not working in my app for some objects.  If I leave the box empty and click Go I expect to see all the objects instances, but instead I see none.  If I enter the id of a known object it does find it.  Any ideas?