I have a Visualforce page (Call VF1) which does some processing and updates a Custom object (Sales_Prints__c). After updating the sales_prints__c on VF1 I need to call another visualforce page (Call VF2) which pulls the values from sales_prints__c and creates a PDF (I’m using renderAs=“”pdf to achieve this). However when VF2 is trying to pull the values it is showing me the old values not the values which were updated by VF1. If I reload the VF2 page manually I can see the new values properly.
I’m stumped! Is this a SOQL cache issue?
Here’s what I tried doing:
- Adding a custom sleep function on VF2 just to cause a delay as I thought it was a timing issue at first. But this did not work.
- Adding FOR UPDATE on VF1, but this did not work either.
Can anyone help me with this?