I got code that use getContent() to generate PDF file.It works fine until Summer Release 15 is activated it give me this exception:
|System.PageReference.getContent() |System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out
This is the code
update myObject; Blob bPlan = pdfPlan.getContent();
I think it is due to to update myObject before getContent();But before this it works but now it is no longer work.I believe whatever limitation that apply on call out will apply to these two methods.
PageReference getContent() and getContentAsPDF() Methods Behave as Callouts in the Summer Release 15
Any idea how to solve this?