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
Krishnam76Krishnam76 

Making records inactive in the database

Hi there,
 
I would like to make records under different objects "Inactive" - that means when the user clicks on the DELETE button he thinks that the record is deleted but it should actually be MARKED as INACTIVE so that we can restore it back anytime.
 
I do not want these records to move over to the recycle bin - as eventually they all get deleted.
 
What is the best approach to acheive such a solution?
 
Thanks
werewolfwerewolf
The best way I can think of is to use a private sharing model and then change the owner of these Inactive records to an "Inactive" owner, setting a sharing rule such that nobody can see them except this owner.

Other than that I can't think of much else.  There is an idea on the IdeaExchange to add the concept of inactive records to Salesforce, you might want to vote that up.