PageReference getContent() and getContentAsPDF() Methods Behave as Callouts

This critical update changes the way calls made to the PageReference methods getContent() and getContentAsPDF() are treated and improves the semantics of the transaction for the calling page.

A PageReference is a reference to an instantiation of a Visualforce page. The getContent() and getContentAsPDF() instance methods return the content of a rendered page as HTML and PDF, respectively. With this update, calls made to these methods behave as callouts, and the calls are tracked against the limits of the calling transaction.

We recommend that you test this update in a sandbox or Developer Edition organization to verify correct behavior of your pages before enabling it in your production organization.

To activate this critical update:
  1. From Setup, click Critical Updates.
  2. Click Activate for “PageReference getContent() and getContentAsPDF() Methods Treated as Callouts.”