How to filter inactive records from List views and Reports
|Knowledge Article Number||000229476|
|Description||In organizations with huge amounts of data there might be a need to make records inactive so that they do not show in reports and list view.
Inactive records should ideally be left in the system as is and not deleted for the purpose of auditing. As a best practice it is always recommended to keep every record as is so that at a later point there is always a way to go back and check if needed.
This article goes over a simple way to add a checkbox field called "Inactive" which when checked implies that the record is not active anymore.
|Resolution||Create a checkbox field
1. Create a custom field of data type 'Checkbox'
Standard object: Your name (Top right hand side) | Setup | Customize | Specific Object | Fields | Scroll down to 'Custom Field & Relationships' section | Click New
Custom object: Your name (Top right hand side) | Setup | Create | Object | Specific custom Object | Fields | Scroll down to 'Custom Field & Relationships' section | Click New
2. Choose Data Type Checkbox
3. Label the field as 'Inactive'
4. Default value as Unchecked - (This means if the record becomes inactive this field must be manually checked by the user)
5. Type in a Meaningful Description in the 'Description' Box
6. Type when this field must be used in the Help Text so any user who sees this field will get a clarity on this field's usage
7. Make the field visible to the required profiles
8. Add the field to the required page layout
Note - Refer to the link in step 1 which also contains a video on creating custom field to make it easier.
Once this field is created, educate the end users (who are likely to use this field) on when this must be used.
This field can be used as one of the criteria in your List view and one of the filters in your report
Create List view