I am trying to generate QuotePDF on click of a JS button. I have not created any VF Page for the PDF and am trying to use the standard functionality. My code to generate PDF is:-
PageReference pr = new PageReference('/quote/quoteTemplateDataViewer.apexp?id='+q.id+'&'+'summlid='+TemplateId);
System.debug('Page reference > ' + pr);
Blob pdfBlob = pr.getContent();
sr.add (new QuoteDocument(
QuoteId = q.Id,
document = pdfBlob));
System.debug('Quote Id Document > ' + q.Id);
}
insert sr;
I am getting following error on the line Blob pdfBlob = pr.getContent();:-
15:29:04:253 FATAL_ERROR System.VisualforceException: ORA-20001: ORA-06512: at "SLEEPY.CACCESS", line 1863ORA-06512: at "SLEEPY.CACCESS", line 3005ORA-06512: at "SLEEPY.CACCESS", line 2874ORA-06512: at line 1SQLException while executing plsql statement: {call cAccess.check_entity_access_ncu(?,?,?,?,?,?)}(EXCLUDED, EXCLUDED, 0Q0N000000098ge, EXCLUDED, true, false)
Kindly help.