Skip to content

A custom field's SQL expression joins to a table (e.g. Ledger Item, referenced from a Voucher-related screen) using what looks like the obvious business key (e.g. voucher_no), but the custom field fails to save with a reference error, and Query Creator shows no relationship between the two projections.

Answer

Check the actual key structure of the table you're joining to, rather than assuming a simpler business identifier is its real key — some core tables (like Ledger Item) are keyed on a composite of several technical fields (for example series ID, item ID, and item version) rather than a single business-friendly column like voucher number. Building the custom field's SQL expression around the table's actual composite key columns, instead of the business key you'd naturally reach for, is what resolves both the save error and the 'no relationship found' result from Query Creator.

← Browse Finance questions