I have one page that modifies a record but before the code finishes, it calls another page. The second page queries the values in the record but I'm assuming that my transaction from the update hasn't completed because the code hasn't finished. I am getting the content of the second page to add as an attachment. The problem is that I set a value on the record before generating the second page in memory. I'm then guessing that the transaction from the update hasn't completed then I build the second page in memory and it queries the field that I changed but gets the previous value because the transaction hadn't been fully committed.
Is there a way to force the commit before my code block exists so that the second page gets the correct value?