Item Sales History
The Item Sales History feature provides a way to accurately import and post your sales history.
- The Item Sales History currently does not support items valued at standard cost.
- You must post item history before you post opening transactions to prevent an impact on your inventory valuation.
- You must simulate posting the item history and then posting the opening inventory in your sandbox environment before you do this in your production environment. This is important to ensure you are satisfied with the results. It is not possible to reverse the entries once they get posted.
Business Value
When you start using Business Central, you want access to the same or better reports that you had before. Your reporting capabilities are enhanced when you have a history and can do comparative reporting. Importing the sales history is complex because Business Central will recalculate the costs when you post transactions. You want the cost of sales to be the same. To do this, you must import all your history (Purchases, Positive Adjustments, Sales, Transfers, etc.) with the correct costing and ensure that the FIFO applications, etc. happen as they did in your previous system. Achieving this is usually not practical due to the effort required.
Feature Details
The Item Sales History feature allows you to import only your sales history with the sales and costs. With the transactions imported into the Item Sales History staging area, the app creates the necessary inventory increases and creates an item journal that you can post. The app also ensures that all G/L postings go through the same take on suspense account so that there is no impact on the general ledger.
All processing is done on the Item Sales History page, accessible from the Run Object page.
Import Sales History Data
You import the item sales history using the Import Text File action.
The expected text file must be a tab-delimited text file, with or without headings. Here is an example:
Document No. Location Sell-to Customer No. Item Posting Date Sales ex GST Cost (Total) Quantity in Base UOM
SIN313421 EAST 10000 1896-s 1/01/2020 494.55 355.33 15
SIN313421 EAST 10000 1900-s 1/01/2020 318.00 221.82 15
SIN313421 EAST 20000 1906-s 1/01/2020 164.85 120.45 5
You can optionally add up to eight dimensions after the Quantity in Base UOM.
- The dimensions represent Shortcut Dimensions 1 to 8.
- If you have fewer dimensions, you only need to include columns for the dimensions you have.
- If you have dimension values for Shortcut Dimensions 2 and 4, you still need to include columns for 1 and 2.
You could alternatively use a configuration package to handle the import of this data. However, this is much slower and might not be practical.
Posting Approach: Nil Effect on the General Ledger
Business Central normally posts inventory transactions to multiple G/L accounts defined in the General Posting Setup and Inventory Posting Setup. During a take-on this creates a problem if the general ledger has already been imported separately — the inventory posting would create duplicate G/L entries and throw the ledger out of balance.
The Archive Posting Setup and Revert Posting Setup actions solve this by temporarily replacing every posting account with a single account before the item journal is posted. Because both the debit and credit sides of every inventory transaction go to the same account, the net G/L movement is zero. The inventory sub-ledger (item ledger entries and value entries) is fully populated, but the general ledger is unaffected.
This approach:
- Avoids the need for a take-on suspense account and the subsequent reversing journals
- Is the preferred method when the general ledger opening balance has already been imported via a G/L journal
This approach assumes that the inventory value you are about to import already matches the G/L inventory balance that was imported separately. If they are not in balance before the take-on, the nil-effect posting will lock in that imbalance permanently — the sub-ledger will show a different inventory value than what the general ledger reflects. Always reconcile inventory value to the G/L before proceeding.
These actions are also accessible from the Run Object page and can be used in any custom take-on process that requires the same nil-effect approach, not just Item Sales History.
Archive Setup
This action archives all account fields from the General Posting Setup and Inventory Posting Setup to an internal table, then replaces every account with the single take-on account you specify. You must do this before creating or posting the item journal.
Specify a G/L account that will act as the routing account. The action modifies two tables:
- General Posting Setup — all account fields are archived.
COGS AccountandInventory Adjmt. Accountare set to the take-on account; all other account fields (sales, purchase, etc.) are blanked. This is why no other transaction types can be posted while the setup is archived. - Inventory Posting Setup — all account fields are archived and set to the take-on account.
Both sides of every inventory posting go through the same account, so the net effect on the general ledger is zero.
You cannot post any other transactions in Business Central except for item sales history once you have archived the setup.
Revert Setup
This action restores all posting setup accounts to the original values from the archive. Run this after the item journal has been fully posted.
The revert must be completed before any further business transactions are posted. Leaving the setup in the archived state will cause all subsequent postings to route through the single take-on account.
This function will create the item journal. The item journal includes:
- All sales and returns from the sales history
- Positive adjustments to increase the inventory so that your inventory does not go into negative.
The batch job has the following options:
| Field | Purpose |
|---|---|
| Template Code | The item journal template for the item journal. You usually specify ITEM here. |
| Batch Name | The item journal batch in which you want to create the item journal. We recommend creating a new batch for sales history. You must not specify any number series on this batch. |
| Default Document No. | This is the document number used for increases and history records that do not have a document number. |
| Bin Code | This is used for locations where bin is mandatory. You can specify any code here - the app will create the bin if it does not exist. You can remove this bin after you have posted your history. |
| Entries per Transaction | Specifies how often the program should commit changes while creating the journal. This setting is to prevent one error from rolling back the entire batch. |
As the sales history can consist of thousands of entries, scheduling this batch job using the job queue is recommended.
Post Item Journal Batch
This function will post the item journal created in the previous step.
You cannot post the sales history journal from the item journal - you must use this option.
The batch job has the following options:
| Field | Purpose |
|---|---|
| Template Code | The item journal template where the app created the item journal. |
| Batch Name | The item journal batch where the app created the item journal. |
| Entries per Transaction | Specifies how often the program should commit changes while creating the journal. This setting is to prevent one error from rolling back the entire batch. |
| Is Sales History Posting | This specifies that the batch contains the sales history. This triggers the additional posting logic required to handle the item sales history. |
As the sales history can consist of thousands of entries, scheduling this batch job using the job queue is recommended.
Create Item Journal
This function will create the item journal. The item journal includes:
- All sales and returns from the sales history
- Positive adjustments to increase the inventory so that your inventory does not go into negative.
The batch job has the following options:
| Field | Purpose |
|---|---|
| Template Code | The item journal template for the item journal. You usually specify ITEM here. |
| Batch Name | The item journal batch in which you want to create the item journal. We recommend creating a new batch for sales history. You must not specify any number series on this batch. |
| Default Document No. | This is the document number used for increases and history records that do not have a document number. |
| Bin Code | This is used for locations where bin is mandatory. You can specify any code here - the app will create the bin if it does not exist. You can remove this bin after you have posted your history. |
| Entries per Transaction | Specifies how often the program should commit changes while creating the journal. This setting is to prevent one error from rolling back the entire batch. |
As the sales history can consist of thousands of entries, scheduling this batch job using the job queue is recommended.
Post Item Journal Batch
This function will post the item journal created in the previous step.
You cannot post the sales history journal from the item journal - you must use this option.
The batch job has the following options:
| Field | Purpose |
|---|---|
| Template Code | The item journal template where the app created the item journal. |
| Batch Name | The item journal batch where the app created the item journal. |
| Entries per Transaction | Specifies how often the program should commit changes while creating the journal. This setting is to prevent one error from rolling back the entire batch. |
| Is Sales History Posting | This specifies that the batch contains the sales history. This triggers the additional posting logic required to handle the item sales history. |
As the sales history can consist of thousands of entries, scheduling this batch job using the job queue is recommended.