I have two custom tables, Invoices and Invoice Line Items. Both primary columns is the Invoice Number. What I want to achieve is to show the Invoice Line Items in a editable subgrid when the invoice is opened.
I have created a one to many relationship on the invoice table

When I add the subgrid to the page it returns all invoice line items from the table, not the expected items for that particular invoice. What step am I missing here?