Dynamics 365 Business Central: How to delete a general ledger account

Dynamics 365 Business Central

Hi, Readers.
Today I want to talk about how to delete a general ledger account in Business Central, and what do we need to make sure before deleting.

In Business Central, the Chart of Accounts is the core of all financial processes. It shows all general ledger accounts, and from the Chart of Accounts page, you can do things like:

  • View reports that show general ledger entries and balances.
  • Close your income statement.
  • Open the G/L account card to add or change settings(Include block).
  • See a list of posting groups that post to that account.
  • View separate debit and credit balances for a single account

You can also delete a general ledger account. However, before you delete it, the following must be true:

  • The balance on the account must be zero.
  • The fiscal year that contains ledger entries of the account must be closed.
  • The Allow G/L Acc. Deletion Before field must be set on the General Ledger Setup page, and the account must not have ledger entries on or after that date.
  • If the Check G/L Account Usage field on the General Ledger Setup page is selected, then the account must not be used in any posting groups or posting setup.

Let’s see more details.

1. The balance on the account must be zero.

If you try to delete a account with balance, the following error message will be displayed.

Balance must be equal to ‘0’ in G/L Account: No.=8470. Current value is ‘2,000’.

2. The fiscal year that contains ledger entries of the account must be closed.

If the fiscal year is not closed, the following error message will be displayed when you try to delete account.

You cannot delete G/L account 8460 because it has ledger entries in a fiscal year that has not been closed yet.

So you must close fiscal year first.

PS: You can find this control in the standard source code.

CannotDeleteGLAccountWithEntriesInOpenFiscalYearErr: Label 'You cannot delete G/L account %1 because it has ledger entries in a fiscal year that has not been closed yet.', Comment = '%1 - G/L Account No. You cannot delete G/L Account 1000 because it has ledger entries in a fiscal year that has not been closed yet.';

3. Allow G/L Acc. Deletion Before field (Check G/L Acc. Deletion After) on the General Ledger Setup page

Specifies if and when general ledger accounts can be deleted. If you enter a date, G/L accounts with entries on or after this date can be deleted only after confirmation by the user.

Note: The caption and the field name are different.

Choose Show more in General group on the General Ledger Setup page.

Then you can find Check G/L Acc. Deletion After field.

For example:
The balance on account 8460 is zero.

General Ledger entries:

The account must not have ledger entries on or after 4/5/2020.

If you try to delete the account, the following message will be shown. (Not error, only a confirm)

Note that accounting regulations may require that you save accounting data for a certain number of years. Are you sure you want to delete the G/L account?

If you still choose Yes, the account will be deleted. But if you choose No, the following error message will be displayed.

You cannot delete G/L account 8460 because it has ledger entries posted after 04/05/20.

PS: If you forget to set Check G/L Acc. Deletion After field, after choosing the delete button, the following error message will be displayed.

Check G/L Acc. Deletion After must have a value in General Ledger Setup: Primary Key=. It cannot be zero or empty.

4. Check G/L Account Usage field on the General Ledger Setup page

Specifies that you want the program to protect G/L accounts that are used in setup tables from being deleted.

On General Ledger Setup page:

For example:
Select Check G/L Account Usage field on the General Ledger Setup page.

For testing, I deliberately set the account that need to be deleted in VAT Posting Setup.

If you try to delete the account, the following message will be shown.

You cannot delete a G/L Account that is used in one or more setup windows. Do you want to open the G/L Account No. Where-Used List Window?

You can see where the account is used.

Test Video:

END

Hope this will help.

Thanks for your reading.

ZHU

コメント

タイトルとURLをコピーしました