Invalid account internal id in account department relationship table" in Sage 50
Sage 50 is reporting a broken link between your accounts and departments, a sign of internal data damage in the company file.
The message “There are invalid account internal id in account department relationship table.” looks like a database error, and in a sense it is. Sage 50 keeps an internal table that links each account to the departments it belongs to. The message means that table now points at an account that no longer exists, or never existed, in your chart of accounts. The link is broken, and Sage 50 cannot safely work with the data until it is fixed.
What the message actually means
The wording is awkward because it comes from a low-level consistency check, not from a screen designed for users. An “internal id” is a number Sage 50 assigns to every account behind the scenes. The “account department relationship table” records which departments each account is used with. When the check runs, it finds a relationship row pointing at an id that is not a valid account. In plain terms: two parts of your file disagree about your accounts, and one of them is wrong.
Why this happens
This kind of damage usually follows an interrupted write. A power loss, a crash, or a network drop while Sage 50 was saving can leave half-finished updates in the file. It can also appear after a failed restore, a conversion that went wrong, or a file that was copied while in use. Less often, it shows up after a version upgrade or a move between machines exposed damage that was already there.
What to try first
Restore your most recent backup, taken before the message appeared. This is the safest fix by far, because it replaces the damaged file entirely rather than trying to patch it. Check the backup opens cleanly and that the error is gone before you rely on it. If you have no recent backup, or the backup shows the same message, do not keep retrying operations on the damaged file. Every session adds new writes, and that can make recovery harder.
Why the built-in tools may not help
Sage 50 does not offer a repair routine that rebuilds this particular table. Its maintenance and verification options check the data they know how to check, but a broken account-to-department link sits below what they reach. If verification reports the file as fine while the message keeps appearing, that is not a contradiction; it means the damage is in a place the check does not cover.
When the file needs professional attention
If the error blocks opening, posting, or reporting, the file needs repair rather than more troubleshooting. Our engineers rebuild damaged Sage 50 and Simply Accounting databases directly, correcting the broken relationships so the file opens and reports normally. We work from a copy you upload, so your working file is never at risk. If your goal is to move to QuickBooks instead, we also handle Sage 50 to QuickBooks conversions, and we can tell you whether a conversion or a repair is the better route for your file.
A useful next step
Stop working in the file and make a safe copy of it now, before anything else changes. Then send it for a free evaluation of your damaged Sage 50 database. We will tell you what is broken, whether it is repairable, and what a fix would involve, with no obligation.