Dynamics 365 Business Central: Can we delete Posted Documents (Posted invoices and credit memos)???

Dynamics 365 Business Central

Hi, Readers.
Today I would like to talk about a topic I was asked recently, can we delete Posted Documents in Business Central, such as posted sales invoices and credit memos.

As you might know, in addition to the setup data, there are two main types of data in Business Central, one is pre-posting data such as master data (Customers, Items…), and transactions data (Sales Orders, General Journals), and the other is posted data such as Posted Sales Invoices, Customer Ledger Entries, etc. In general, we can modify and delete the pre-posting data but we can’t modify and delete the posted data.
PS: There are special features to edit posted documents. More details: Edit Posted Documents

For these posted tables, we cannot create, modify, or delete them through the Configuration Package.

Sorry, the current permissions prevented the action. (TableData Sales Invoice Header Insert: Base Application)

And if you want to edit the posted data in the code, you also need to add the Permissions Property. For example, in codeunit 80 “Sales-Post”

So many people think that Posted Document cannot be deleted. Actually, no, it can simply be deleted by changing a single setting.

First of all, on both the Posted Sales Invoices page and the Posted Sales Invoice page, the Delete action is activated and can be clicked.

If you are on the default settings, you will get the following error message.

Allow Document Deletion Before must have a value in Sales & Receivables Setup: Primary Key=. It cannot be zero or empty.

According to the error message, we can find the following setting in Sales & Receivables Setup.

Allow Document Deletion Before
Specifies if and when posted sales invoices and credit memos can be deleted. If you enter a date, posted sales documents with a posting date on or after this date cannot be deleted.

So as long as we set the date in Allow Document Deletion Before field, posted documents before this date can be deleted.

For example,

Posted Sales Invoice 103215 has been deleted. And it can be deleted regardless of whether there is a Remaining Amount or not.

PS: If this invoice has not been printed once, the system will also prevent deletion

No. Printed must have a value in Sales Invoice Header: No.=103215. It cannot be zero or empty.

Test video:

The same is true for Posted Purchase Documents.

Allow Document Deletion Before
Specifies if and when posted purchase invoices and credit memos can be deleted. If you enter a date, posted purchase documents with a posting date on or after this date cannot be deleted.

So the big question on everyone’s mind is, will deleting Posted Documents affect the financial data? It doesn’t, because the financial data are taken from the various Ledger Entries tables, and as long as you don’t go deleting the Ledger Entries data (cannot be deleted in standard), it won’t affect the financial data. For example, the invoice just deleted is actually still stored in Customer Ledger Entries.

However, it is personally recommended to never delete Posted Documents, which may cause some other problems. For example, when you click Find entries on Customer Ledger Entries, you cannot see Posted Sales Invoice……It should also not be deleted in order to ensure data consistency and tracking. And deleting it won’t do any good…It might save a little capacity.

Conversely, if you’ve ever posted an invoice but can’t find it, you may have accidentally deleted it. Please check the settings. Give it a try!!!😁

PS:
How to extend the Posted Document Update page (A solution for editing Posted Document)

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL