You need to sign in to do that
Don't have an account?
Force Database Commit
Does anyone know if there's a way to force a commit during a transaction. The reason I need this is I have a method that inserts data into a custom object and I want to call getContent on a visualforce page to get some information based on the object just inserted. The problem is that the content isn't actually there yet becasue it doesn't get commited till the end of the transaction so in the getContent transaction the data doesn't exist : ( . How can I force this a commit? Also keep in mind that getContent() is not allowed in async or batch apex so those aren't an option.
Thanks!
Scott
Based on my previous research, we have no way to force a database commit.
I just had to do some workaround in order to get the content to generate a PDF by having the getContent in a seperate button thus adding another step for the user.
Hope Salesforce could implement something like this soon.