Setting up recycle bin functionality in Archer GRC

599 views Asked by At

When deleting records within the platform, this action is not reversible via the front end. Is there a way to allow users to remove a record from their view without actually deleting the record?

2

There are 2 answers

0
AudioBubble On BEST ANSWER

You can simulate recycle bin functionality within Archer GRC by adding a record permission field that grants read access to "Everyone". If read access is no longer required then an editor of the record can go in and change "Everyone" to a group called "Recycle Bin."

Please note that if there are other record permission fields in the application, users or groups may still have access if they are selected in those fields. Perhaps You can set up a dropdown status field for the user to select "Recycle Bin" and use this condition for automatic record permissions to revoke permission to the record depending on the requirements or workflow of the application.

1
Stan Utevski On

Solution shared by Igritte might be somewhat confusing for end users. End user will see greyed out "Delete" button in the top toolbar, but he has to select "Recycle Bin" in the form. This solution was not accepted by my business owner at some point.

As a work around for "Soft delete", I wrote a custom object overriding "Delete" button functionality.

1. User doesn't have delete access to the record, so JavaScript code will make "Delete" button look like active and available.

2. Once the button is clicked, custom object will populate value in the hidden value list and simulate the click on the "Save" button.
Update: Note that Custom object needs to hide the value list first once the page is loaded. Here you will need to use a JavaScript and do the following: [a] locate the value list DOM object and [b] set display attribute to none. I used jQuery library to do both. This way your value list is not displayed, but you still can use it to control data driven events.

3. With hidden value populated and submitted, record permission will hide this record from the end user. Note that custom object hides one value list on the layout as well. If for some reason JavaScript doesn't load properly, user simply will not be able to click on the grayed out "Delete" button.
Update: Hidden value list can be populated by custom object using JavaScript code as well. You need to identify the form tag "input" in HTML code of the page and set attribute "value" to the desired state. I used jQuery library to do this as well.

I have this solution in production working fine with IE11, FF and Chrome. I can't share the code, but with WC3Schools JavaScript guides and 4 hours you can write and test it yourself with very little JavaScript skills. Sometimes you have to use custom objects when you want to get a user-friendly solution of not available functionality.

Good luck!