General X++ Development

Are RecIds unique across tables in D365FO?

Asked by Sunny Vasty· Aug 13, 2026· 1 answers

Are RecIds unique across tables in D365FO?

SSunny Vasty75 reputation · answered Aug 13, 2026

Do not treat a RecId as a universal identifier across every table.

A RecId identifies a record in the context of its table. If you are storing a generic reference to an unknown table, you normally need the table ID too.

That is why D365FO has patterns such as:

Code
RefTableId + RefRecId

If your code only stores a RecId but can point to multiple table types, you are missing part of the reference.