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
CleanDataCleanData 

Roll-back or Undo Changes?

Is there a way to roll back or undo changes to an Account, contact or Lead based on the tracked history of changes?

 

Can a mass roll back be done based on criteria?

Can individual records be rolled back?

Ankit AroraAnkit Arora

In apex we can use "rollback" and "setSave points", please refer

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database.htm

 

But you want to rollback on basis of history then it is not possible using any native feature. But if you implement logic to do so it is. Lets say I have inserted 100 account records, once it is inserted in database then you must use Delete to delete them and can not do any thing else.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

Shashikant SharmaShashikant Sharma

Yes I think you can achieve this using oldvalue in history table for the object. I think If you want to to this you hav to write Apex Script Logic which update the record's field values to oldvalue of the record if record satisfies the criteria as per you requirement.

Individual : You can put a Detail Button and run this logic for individual .

Mass roll Back : You can write a batch and put a list button to nudge the batch manualy or write a scheduler which will run this apex script as per scheduled.

 

Please ask if any issues in above.

Bhuvanesh MohankumarBhuvanesh Mohankumar
This is again a New Question related to above Discussion

In Reports -> Kanban View
When I drag and drop any item, is there any undo comments or option available, so before saving I can do undo or cancel the changes?
In Kanban view, there is no explicit "SAVE" option, once I modify the card it saves automatically.
Is any option to Undo or discard changes?