Skip to main content

Invoice Not Cleared But Marked as Sent to New Business Central Server

Problem (ISSUE-009)​

An invoice appears as sent to the new Business Central server but isn't actually there.

Symptoms​

  • Invoice is marked as sent or replicated, but it does not appear on the new Business Central server.
  • Integration or replication monitoring shows the invoice as completed, but finance or auditors cannot find it in the new environment.
  • Store or business users report missing invoice data in the new Business Central system.

Solution​

Use SQL Server Management Studio to resolve:

Step 1: Check the Specific Invoice​

SELECT * FROM [Al Amer Market Live$Sales Invoice Header] 
WHERE No_ = 'PSI-24005094';

Step 2: Filter for Missing Replicated Invoices​

SELECT * FROM [Al Amer Market Live$Sales Invoice Header] 
WHERE [Document Date] >= '2024-03-01 00:00:00.000'
AND [Document Date] < '2025-10-13 00:00:00.000'
AND [ZATCA QR Text] IS NULL
AND [No_] LIKE 'PSI-%';

Step 3: Resend the Invoice by Resetting the Replication Flag​

UPDATE [Al Amer Market Live$Sales Invoice Header]
SET [Replicated] = 0
WHERE [No_] = 'PSI-24005094';
Replication Reset

This resets the replication flag so the background job picks it up again and re-sends it to the new server.

SQL Server Access

This solution requires direct SQL Server access. Ensure you have proper permissions and understand the implications before running UPDATE statements.


Prevention​

  • Monitor replication jobs and logs regularly to detect failed or missing invoices.
  • Ensure background jobs responsible for replication are running and monitored.
  • Establish a regular reconciliation process between the source database and the new Business Central server to identify discrepancies.


Additional Resources​