Error: "Unable to read invoice - Invalid Key [BL 5202]"

Summary

When trying to work with an invoice in Sage 300 CRE Billing, you get the message "Unable to read invoice - Invalid Key BL 5202".

Description

Error variations

  • Error: Unable to read invoice - Invalid Key BL 5202
  • Error: Unable to update worksheet entry, Invalid Key BL 5202
  • Error: Unable to read invoice - Invalid Key(1) BL5202
  • Error: Unable to read invoice - ☜︎❒︎❒︎□︎❒︎🖳︎ ◆︎■︎♋︎♌︎●︎♏︎ ⧫︎□︎ ❒︎♏︎♋︎♎︎ ♓︎■︎❖︎□︎♓︎♍︎♏︎ 📫︎ ♓︎■︎❖︎♋︎●︎♓︎♎︎ 🙵♏︎⍓︎🕿︎📂︎✆︎ ♌︎●︎🗄︎📄︎📁︎📄︎ BL5202

Cause

Duplicate key issue in the Unbilled.bli file

Another invoice exists for this customer with the same Generation Date and Generation Sequence, which causes a duplicate key error when updating the invoice.

This can also occur if you changed the customer on a contract without deleting the existing invoice first in Contract-Based Invoices.

Corrupt contract record

You have a corrupted contract.

Resolution

Duplicate key

Complete the steps below to correct a duplicate key issue. Depending on the cause, you don't have to complete all steps.

Verify the customer on the contract

  1. In Billing, review the following inquiry. Find the contract and the customer ID that is associated with the contract.
    1. From the Inquiry menu, select Invoices, All Invoices.
    2. Select Unbilled and click OK.
    3. Select Active and click OK.
  2. Write down the Customer showing for the contract that gets the error.
  3. In Contracts, from the File menu, select Open Contract.
  4. Select the affected contract and click OK.
  5. On each contract item, verify that the Customer matches the customer from step 2.
    • If the customer doesn't match, change the Customer to the same one showing in the Billing inquiry
    • If the customer matches, exit the contract and proceed to Rename the Unbilled.bli file below
  6. Exit the contract.
  7. In Billing, select Contract-Based Invoices.
  8. Select the affected contract and click OK.
  9. Click Delete Invoice, click Yes when asked if you're sure you wish to delete, and click Finish.
  10. Reopen the contract in Contracts.
  11. Change the Customer for each item back to the correct customer if needed.

Rename the Unbilled.bli file

  1. Verify which invoices exist in the unbilled.bli. Renaming this file will delete any incomplete invoices.
    1. From the Inquiry menu, select Invoices, All Invoices.
    2. Select Unbilled and click OK.
    3. Select Active and click OK.
  2. Finish and post all other in-progress invoices that you need to keep.
  3. From the Tools menu, select File Tools.
  4. Select Rename and click Next.
  5. Click Browse, select the unbilled.BLI file, and then click Open.
  6. Enter a New file name such as unbilled01-01-2006 (file name with the date added on).
  7. Click Next four times.
  8. Click Finish.
  9. You can now reenter the invoice.

Move the renamed file

Move the renamed file to a junk folder. Keeping renamed files in your live data folder can cause issues with SQL Replicator and third-party programs.

Corrupt contract

Delete the contract and recreate it.

Related Solutions

How do I rename a file using File Tools?

Solution Properties

Solution ID
222924150017337
Last Modified Date
Thu Nov 11 18:15:06 UTC 2021
Attributes
Product Details
Integrated Product: Chatbot
Views
0