On related list, when the search result is empty, it can show both "No records to display" message and the whole list of recordsDescriptionOn related list, when the search result is empty, it can show both "No records to display" message and the whole list of records.Steps to Reproduce Create relationship following this Doc: Create defined related listsSet query as below: (function refineQuery(current, parent) {// Add your code here, such as current.addQuery(field, value);current.addQuery('field', parent.field);current.query();})(current, parent); Just search for something that it does not exist in field search or filter icon.- Expected Behavior: Only "No records to display" shows.- Actual Behavior: "No records to display" and the whole list show.WorkaroundThis is expected behavior and by design in all currently supported releases. In the example given, the "Query with" script should not have a current.query() statement. The related list code executes the query, so a duplicate query statement can lead to unexpected results. This is evidently one of them. Appropriate remediation for the example given is to remove the current.query() statement from the "Query with" script.Related Problem: PRB1587595