Recently we came across a situation in Dynamics AX 2012 where the Country/Region Code on the Legal Entity was set incorrectly. This caused an issue because when we generated a NACHA file the bank rejected it since it did not have the proper fields. Since there were transactions for this Legal Entity the system will not allow you to change the Country Code.
Since we were still in the testing phase and the system was not live we were able to run the class SysDatabaseTransDelete. When running this class it will delete all transactional data in the Legal Entity. Once the transactional data has been deleted you will be able to change the Country/Region Code on the Primary Business Address on the Legal Entity.
We also noticed that when we ran a Trial Balance we were still seeing amounts for the accounts. This can resolved by going to General Ledger | Setup | Financial Dimensions | Financial Dimension Sets and run Rebuild Balances on all the Financial Dimension Sets listed.