Issue
This article focuses on how to load only those set of records in the list view that are explicitly defined on base-tables.
Release
All Releases
Resolution
For each base table, there is a column/field/dictionary called sys_class_name that shows the table name for each record created:
- This field shows the name of the table where this record is defined (on child table or parent table or base table).
- This field can act as a key for filtering the records.
The following example demonstrates this:
- Create before-query business rule on a table let's say, task with the following script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.addQuery('sys_class_name', 'task');})(current, previous);
- The above script will show only those records that are explicitly created at task table (filtering out records from incident, problem, etc.)
- One caveat here is that this will not just impact the list view (of task table) but on all aspects through which this table is queried.
You can also create a default filter that will run whenever the list is loaded.
Related Links
This is kind of a custom behavior and it all depends on respective data integrity. It will break otherwise.
Set a predefined filter as result: Set a predefined filter as default
Default before-query business rule: Before Query business rules
Instance Customization FAQs and Guidelines: Customization vs configuration | FAQ and guidelines