[RT17143] Retrieving relevant record ids