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
KaityKaity 

Roll back after SAVE operation. (say after 10 mins of Save)

Hi,
I have the below requirement.
Suppose I have a visual force page where i want to Assign Accounts to various users based upon certain criteria. I have implemented this portion.
However, if I want to revert back to the initial phase(prior to save) after sometime(in different transaction), how can we achieve this?


NOTE: I think savepoint() and rollback() can not be sole this problem. Sunce after safe, we lost the transaction. Please help!
Thanks,
Kaity
Himanshu ParasharHimanshu Parashar
Hi Kaity,

Yes you are correct savepoint and rollback won't help you here though you can go to one alternative solution where you will get this information from Account History object.

You can follow below process.

1. Write a batch job which will run in every 10 min.
2. Get Data from Account history object and write your logic.

Makes sense ?

Thanks,
Himanshu