function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

"DML currently not allowed" on PDF page

I have a VF page rendered as PDF.

I have to perform a DML operation on this page.

I am getting the error:

"DML currently not allowed"


How to perform a DML operation on this PDF page?




Are you attempting DML in the constructor (or a getter)?  This isn't allowed I'm afraid.  I've blogged a workaround at:


is this any help?