AnsweredAssumed Answered

Hide Records From Layout

Question asked by danjamins on Dec 22, 2016
Latest reply on Dec 22, 2016 by danjamins

Hi Everyone!


I have a question that I've half figured out but maybe there's a better way to do it.


What I'm trying to accomplish is hiding records on a specific layout from being displayed if a field is set to a certain value.


Table: Accounts

Field: Deleted (boolean values 1 or 0 stored)

Layout: Accounts_DETAIL



I want to allow users to "delete" Accounts without actually deleting the record so we can restore the Account if it was deleted accidentally. Right now I setup a script that when the user clicks "Delete Account" it sets the field "Deleted" to 1. Then anytime the user goes into the layout, I have a script trigger on the layout to omit all records with that field set to "1" but the only problem is if they do a "Show All" command it will display these records again.


Is there a way I can prevent them from ever viewing these records again unless the Delete field is set to 0 or empty?