Dynamics AX 2012 introduces built-in support for resolving and looking up linked records based on reference record IDs.
When adding a reference record ID field to a form, AX will add a reference group control instead of the reference record ID, and will show a selected set of fields from the referenced table. See the posts about tree lookups for an example.
The reference group control also does lookups into the referenced table for selecting a new value. However, by default this lookup is not filtered and will show all records in the referenced table. Adding filtering is quite easy to do and it follows a similar pattern as regular table lookups.