Step-by-step Guide
The guide is split into two separate sections:
1. Archiving posted transactions to archive tables
2. Exporting archive transactions to an Azure Storage Account
1. Archiving posted transactions to archive tables
Moving posted transactions to archive tables
Setup:
-
Configure Archive Thresholds — Retail Setup
This step defines how long transactions stay in each storage tier before being moved.
Navigation: LS Central → Retail Setup
|
Field |
Description |
|
Days Before Trans. Archive |
The number of days a transaction remains in the primary transaction table before being moved to the internal archive. Set this based on how often staff need to access recent transactions directly from the POS. |
-
Configure the Scheduler Jobs
This step sets up the job that run the archiving process on a regular schedule.
Navigation:LS Central → Scheduler Jobs
- Create new scheduler job
- On the Object Setup FastTab, assign codeunit 99001453 (LSC Transaction Archiving)
- Configure when the job should run
Codeunit 99001453 (LSC Transaction Archiving) copies posted transactions into the archive tables and then deletes them from primary tables.
More information about setting up Scheduler Jobs can be found in the following link: https://help.lscentral.lsretail.com/Content/LS-Retail/Replication/Data-Distribution/Scheduler-Jobs.htm
Note:
- A daily schedule is recommended for high-volume environments.
- Archiving can cause transaction-related tables to be locked during the archive process. Run the job outside of business hours where possible.
Testing the process:
With Retail Setup and the Scheduler Job in place, the archive job runs automatically on its defined schedule. You can also trigger it manually for testing.
When the job runs, it:
- Identifies all transactions that have exceeded the Days Before Trans. Archive threshold.
- Moves those transactions from the transactions tables to the archive tables (please refer to page Archived Transaction):
Restoring archived transactions:
Navigate to the Restore Archived Transactions report in LS Central. Use the available filters to specify which transactions you want to restore back to the transaction tables.
2. Exporting archive transactions to an Azure Storage Account
Prerequisites
- An active Microsoft Azure subscription is available.
- An Azure Storage Account has been created.
- An Azure Blob Storage Container for archived transactions has been created within the Storage Account.
- LS Central version 28.0 or later is installed.
Setup
-
Configure Archive Thresholds - Retail Setup
This step defines how long transactions stay in each storage tier before being moved.
Navigation: LS Central → Retail Setup
|
Field |
Description |
| Days Before Archive Transaction External |
The number of days a transaction remains in the internal archive before being exported to Azure Storage. |
-
Configure the Scheduler Jobs
This step sets up the job that run the archiving process on a regular schedule.
Navigation:LS Central → Scheduler Jobs
- Create new scheduler job
- On the Object Setup FastTab, assign codeunit 10001429 (LSC Archive Trans. External)
- Configure when the job should run
Codeunit 10001429 (LSC Archive Trans. External) is used to export transactions in the internal archive to storage account based on Days Before Archive Transaction External in the Retail Setup page.
Note:
- The job exports transactions that exceed this number of days since they were archived.
- External archived transactions can be found in page Archived Transaction External.
Configure when the job should run, as you would do for any other scheduler job.
More information about setting up Scheduler Jobs can be found in the following link: Scheduler Jobs
-
Configure Azure Storage Connection - Web Replication Azure Storage Setup
This step is required to provide information for LS Central to connect to your Azure Storage account so transactions can be exported.
Navigation:LS Central → Web Replication Azure Storage Setup
Web Replication Azure Storage Setup page
Fill in the following required fields, in the Storage Account FastTab:
- Account Name: Enter the Azure Storage Account name.
- Account Key: Enter the Azure Storage Account access key.
- Archived Transaction Container ID: Enter the name of the Azure Blob Storage container you created for archived transactions. This is where exported transactions will be stored and from where they can be imported back when needed.
Note:
- For the Account Name and Account Key fields, please refer to instructions on How to: Set Up an Azure Storage Account
- You can find the Container ID (name) in the Azure Portal under: Storage Account → Containers.
-
Run the job to export archived transactions to Azure Storage
With Retail Setup and the Scheduler Job in place, the exporting job will run automatically on its defined schedule. You can also trigger it manually for testing.
When the job runs, it:
- Identifies all transactions that have exceeded the Days Before Archive Transaction External threshold.
- The job moves eligible transactions from the archive tables to the Azure Storage container configured in Step 3.
To verify: navigate to the Archived Transaction External page — all externally archived transactions are listed here.
Restoring transactions from external storage account
- Navigate to the Archived Transaction External page.
- Locate the transaction you need.
- Use the Restore Archived Transaction from External action to move it back into the internal archive.