Sales Shipment Filters

I am trying to have a view that shows all Sales shipment header records where there are lines that have not been invoiced. My first thought was to create a flowfield on the Sales Shipment Header “Exist(“Sales Shipment Line” WHERE (Document No.=FIELD(No.),Qty. Shipped Not Invoiced=FILTER(<>0)))” and then filter on this. This works OK but is very slow with a large number of records, even with suitable keys set. Anyone have any better ideas on how to achieve this?

You need to create a normal boolean field on the Sales Shipment Header and modify codeunit 80 to call Your own function where You check if all lines has been invoiced. If so set Your new field to TRUE. Also create a key on that field.