This post is a follow up of this one..
https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/411963/linking-data-sources-on-the-sales-form
If I Set the link Type to 'Outer Join', the grid will include all the records in the DocuRef Table.
If I set the link type to 'Inner Join', I can only see sales orders that have records in the DocuRef table.

Here is how I'm linking the tables
[ExtensionOf(formDataSourceStr(SalesTable,DocuRef))]
final class TetsSalesTableDatasource_Extension
{
public void init()
{ Query q;
QueryBuildDataSource qbds;
QueryBuildRange qbr;
FormDataSource formDS = this;
DocuRef DocuRef;
next Init();
q = formDS.query();
qbds = q.dataSourceTable(tableNum(DocuRef));
qbds.addLink(fieldNum(SalesTable,RecId),fieldNum(DocuRef,RefRecId));
qbds.addLink(fieldNum(SalesTable,TableId),fieldNum(DocuRef,RefTableId));
}
}
What am I missing?