web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

GP Credit Memos Unable to be Applied

(1) ShareShare
ReportReport
Posted on by 10
I have had an incident with Microsoft and we tried many things to attempt to resolve this issue.
TrackingID#2602180010001147
 
Here is what we tried:
 
Unfortunately, this issue continues to plague the GP database and we need it resolved.
I have been using self-created SQL scripts to 
1) Apply the CRM to an invoice
2) Migrate the CRM and/or invoice to history
 
As you may be aware, this is very complex depending on if the invoice or CRM is in history or open tables.
Many tables and values are at play here and my client is not happy with having a consultant manually apply CRM's to invoices ... especially since Microsoft was assisting with this resolution.
Let me know if this is a common issue amongst GP users?
 

 

For the remaining Credit Memos (CMs) that still cannot be applied, the "lock" likely exists in one of the auxiliary tables used to manage transaction status and applications. Below are the details of the batch posting sequence and the specific tables you should validate to ensure the data cleanup is 100% complete.

Standard Posting Sequence (Work to Open)

When a Payables batch posts, the system performs these steps in a specific order. If an interruption occurs (like the July update), the sequence breaks, leaving "orphaned" records in the earlier tables or incorrect status flags in the later ones.

 

  1. Status Check: The system verifies the batch is not locked in SY00500 (Batch Master) and SY00800 (Activity).

  2. Move to Open: Data is "pasted" from Work tables (PM10000, PM10100) into the Open table (PM20000).

  3. Keys Update: The Master Keys table (PM00400) is updated to change the document status from 1 (Work) to 2 (Open).

  4. GL Integration: Distributions are written to the General Ledger tables (GL10000/GL20000).

  5. Cleanup: The system deletes the original records from the Work tables and clears the BACHNUMB and BCHSOURC from the Open records.

Final Cleanup Checklist for "Stuck" CMs

If a CM is in PM20000 with a blank BACHNUMB but still won't apply, please validate these four areas:

1. The Keys Master (PM00400)

This table is the "traffic controller." If the status here is wrong, the CM will not appear in the Apply window.

  • Validation: Ensure DCSTATUS is 2 (Open). If it is 1, the system thinks it is still an unposted "Work" transaction.

  • Script: SELECT DCSTATUS, * FROM PM00400 WHERE CNTRLNUM = '[Voucher_Number]'

2. Orphaned Apply Records (PM20100)

If a CM was partially applied or selected in a previous "ghost" session, a record might exist in the PM20100 (Apply Open) table. This "claims" the CM, making it unavailable for new applications.

  • Validation: Check if the affected CM's Voucher Number exists in this table as either the APTODCNM or APFRDCNM.

  • Action: If a record exists for a session that no longer exists, it should be removed.

3. Activity Locks (SY00800 & SY00801)

Even if the batch appears gone, a SQL-level lock might still be tied to the User ID or the Batch ID.

  • Validation: Search for any records tied to the problematic batch name or the users who were posting during the July update.

  • Script: SELECT * FROM DYNAMICS..SY00800 WHERE BACHNUMB = '[Batch_Name]'

4. Document Amount Mismatch (PM20000)

Ensure the CURTRXAM (Current Transaction Amount) is exactly equal to the DOCAMNT (unless it was legitimately partially applied). If CURTRXAM is 0.00, the system considers it "fully applied" and will not show it in the Apply window.

 


Great catch on the BACHNUMB field. That is undeniably the "smoking gun."

 

In the Payables logic, a record in the PM20000 (Open) table should only have a populated BACHNUMB if it is currently being edited or sitting in an unposted payment batch. If a posted Credit Memo still carries a batch ID, the system treats it as "reserved." This is why they look perfect in the data but remain "invisible" to the Apply and EFT/Cheque Generation windows the application is essentially protecting them from being used twice.

 

Why this happened

 

The July 2025 tax table update likely caused an "interrupted posting" scenario. The transactions successfully moved to the Open table and updated the General Ledger, but the final "cleanup" trigger which clears the Batch ID failed to fire. Since then, these records have been stuck in a metadata limbo.

 

Recommended Resolution Path

 

To release these "ghost" records, we need to manually clear the BACHNUMB at the SQL level. Since your previous attempts with Checklinks and Reconcile didn't touch this specific metadata, a targeted script is the most direct path.

 

1. Verification Script

 

Before applying the fix, run this to confirm exactly how many records are affected:

 

SQL

 

SELECT VCHRNMBR, VENDORID, BACHNUMB, DOCAMNT, CURTRXAM 
FROM PM20000 
WHERE BACHNUMB <> '' 
AND DOCTYPE = 5 
AND VOIDED = 0;

 

2. The Fix (Update Script)

 

   Note: Please ensure you have a fresh backup of the company database before running this update.

 

SQL

 

/* Clearing the batch lock to make CMs available for application */
UPDATE PM20000 
SET BACHNUMB = '' 
WHERE DOCTYPE = 5 
AND BACHNUMB = '[Insert_Batch_Name_From_Report]'
-- Optional: Add VCHRNMBR filters if you want to test one record first

 

Next Steps

 

Once the BACHNUMB is set to an empty string (''), these Credit Memos should immediately populate in the Apply Payables Documents window and be available for your next EFT run.

Important Note: Always take a full backup of your SQL database before performing manual DELETE or UPDATE statements. Try this in your TEST environment.

 

Your prompt attention to this matter is appreciated. Please review the information above and share your feedback or any follow-up questions. Your insights are invaluable, and I’m eager to assist further.

 
Categories:
I have the same question (0)
  • Subra Profile Picture
    1,430 on at
    It's looks like the issue is related to CRM, is yes, please move this ticket to correct forum instead of D365.
  • SH-06052129-0 Profile Picture
    10 on at
    By CRM I mean Credit Memo.  This is a GP issue.
  • Joseph Markovich Profile Picture
    4,007 on at
    What version of GP was this July 2025 update? Can you get to a later version to potentially fix this?
     
    Joe
  • SH-06052129-0 Profile Picture
    10 on at
    The version is from the Canadian Tax Table update Dec 2025.
    18.8.1919 (2025)
     
    My client has experienced this issue since the July 2025 update.
    I worked extensively with Azeez from Microsoft and we did clear up the issue for the existing Credit Memos as at Mar 2, 2026
    However, it can take some time before companies issue credit memos again and the new Credit Memos are acting the same way.
     
    Basically, we fixed the problem but not the cause.
  • BJ-09051414-0 Profile Picture
    409 on at
    Hello,

    Reading this, some of the information is not correct and why you might be struggling with this.
    1. It is first mentioned that the BACHNUMB is blank in the PM20000.
      1. This really does not matter. That field is not used for anything after it was posted. It will not cause any issues at all if this is blank, has a letter or number in it. You can change in the tables and it won’t effect anything.
        1. All the batch id does is allow you to group multiple transaction to one batch so you can post multiple at one time.
        2. If you post a transaction without a batch, this updates with the user ID that posted the batch.
          1. We call this Transaction Level Posting.
    2. The PM00400 (Keys).
      1. This really is not a Traffic Controller. This is used for the following:
        1. Tells where GP thinks the document is.
          1. 1 = work
          2. 2 = open.
          3. 3 = history.
        2. This is also used to check if a Document Number has been so if you do not allow duplicate document numbers, it will not let use a number that was already used.
      2. The statement about a Credit Memo not appearing in the Apply window if the PM00400 record is missing is not true.
        1. The Credit memo in the screenshots is posted (In the PM20000).
        2. The apply window does not care about the PM00400 record. It looks at the PM10000 or the PM20000 and the Current Transaction Amount to determine if will show in that window. Example below of a Credit Memo in my system without the PM00400 record showing in the Apply window.
        1. It also does not care if the DCSTATUS is a 1 (Work) but the transaction record is in the PM20000 (Open).
        1. It is good to valid the status, but it would have no effect during the apply process.
    1. Orphaned Apply records in the PM20100 table.
      1. This table is probably the most misunderstood table because they add apply to the Name.
        1. This is no way an apply table and it has no effect on what is actually applied other than sometimes causing a popup saying it partially applied or part of a recovered batch (Damaged Data).
        2. I like to call this table the Remittance Table instead of the Temp apply table.
        3. This table is used for when printing Remittances.
        4. Once it is printed on the Remittance, that record is deleted from the PM20100 table.
        5. This record can cause a problem. The problem that it causes is it stops transactions from moving to history.
        6. The only time we should be removing a record from this table in my experience is:
          1. Document will not move to history after being applied.
          2. Document incorrectly printing on the Check Remittance.
          3. If you get an error stating the document is part of a recovered batch or is partially applied.
            1. This usually happens because of an interruption that left bad data.
        7. There is no harm to deleting the records in this table. All it will do is stop that record from printing on the Check Remittance which really is not a big deal.
          1. It also gets deleted by the system once it printed on the remittance.
      2. Activity locks in the SY00800 or SY00801.
        1. If there is a lock in these tables, GP will error on you saying that the record is locked.
          1. I personally have not seen this cause problem with apply because you would not be able to select the document in the apply window.
          2. I believe this is irrelevant to your issue.
      3. Document Amount Mismatch in the PM20000.
        1. The Current Transaction amount is the Amount Remaining.
        2. If nothing applied, this should match the Document Amount.
        3. If something is applied, you take the Document Amount – The Apply Amount (In the PM10200 or PM30300) to get what the actual Current Amount is.
        4. The Batch ID is irrelevant at this point.
          1. The only time this would matter is if you have a duplicate.
            1. Duplicate means a record in more than one of the table.
              1. Transactions.
                1. PM10000
                2. PM20000
                3. PM30200
              2. Payment.
                1. PM10300
                2. PM10400
                3. PM20000
                4. PM30200.
            2. GP will error on you with a DBMS 2627 duplicate error if that is the case.
          2. The Bachnumb in the PM2000 will not have any effect on it showing in the apply window at all unless there is a duplicate and that is because GP does not know what actual status it is in because it is in two tables and should only be in one.
          3. Most common causes for a document not showing up in the apply window.
            1. Missing PM20000 record for either the Document wanting to be applied or Applied to.
            2. Duplicate between multiple transaction tables.
            3. Transaction not Posted.
              1. You need to take into consideration that there are two ways to apply.
                1. During Creation.
                2. After posting.
              2. During Creation, the bottom section of the apply window will show ONLY Posted Open Transaction (PM20000).
              3. During Creation, the top part where you select the Credit Document to apply will only show the document that was open when you clicked the apply button in the Entry window.
          4. The Batch ID in the PM20000 is what the Batch ID was the transaction was saved to if posting from a batch.
            1. If transaction level posting (without a batch) it assigned the GP user ID instead.
            2. Again, this has 0 effect on applying.
      4. Why this happened.
        1. This would not be why this happened. The batch id has no effect.
        2. Why this really happened is because there was a posting interruption which caused the process to fail and leave the data fragment between tables.
          1. As you mention it happens with new Credit Memos, is it possible the some of the documents from original issue are getting applied by the new Credit Memos?
          2. Perhaps a customization or Integrations is causing this.
          3. I have not seen anything from clients seeing this same issue. I would expect if this was a problem with GP, it would think more would be opening cases/talking about this.
      5. The Validation scripts.
        1. I do not see how these are helpful after discussing the above as the Batch ID does not matter if it is populated in the PM20000 table or not.
    2. What I think is really happening here.
      1. You likely have duplicates between the PM10000 and the PM20000 or PM30200.
      2. The Amount Remaining on the documents that are not showing is 0.00.
      3. One document is in history and one document is open.
        1. If the Credit Memo is in history, it will not be able to be selected in the Apply window as the Apply window will only show you what is in open.
        2. If the Invoice is in history, it will allow you to pull up the Credit Memo but will not show the Invoice that is in history.
        3. If there is a PM20100 record causing problems and both documents are in open, both will show in the apply window. However, you will not be able to unapply due to the PM20100 record.
    3. Is there more? Likely. Apply records and Distribution records were not covered really in the above but those should not stop stuff from showing in the apply window.
    4. Multicurrency also adds to it.
    5. With the issue happening on new Credit Memos, it could be bad data or it could be a third party or it could be your self created apply scripts.
    My suggestion going forward:
    1. I assume Microsoft provided the All PM script.
      1. I would run this for the Credit Memo and the Invoice in question.
    2. Verify both are in open (PM20000).
    3. Verify that each document only has a record in one of the following tables. More than one is bad.
      1. Transaction.
        1. PM10000 Work
        2. PM20000 Open
        3. PM30200 History.
      2. Payment
        1. PM10300
        2. PM10400
        3. PM20000 – very unusual to see a payment here.
        4. PM30200.
        5. PM10000 – Only if a Check on the fly. This is one record that is for the Invoice and Payment just the Payment field populated.
    4. Amount Remaining is not 0.00.
      1. If 0.00 verify the Apply Amount is the same as the Document amount and if so, then 0.00 is valid.
    5. PM20100 records.
      1. In test, delete these as they just cause problems if you are not super familiar with the table flow.
    6. If importing, could be bad data coming from the import.
      1. Test manually entering a Credit and Invoice and see if the same issue happens.
    7. Sometimes, the easiest approach is to get everything back in open and unapplied. Verify the Amount Remaining is correct and Re-apply it.
    If you need assistance with digging into this, I would be happy to assist if you want to create a ticket with us over at Enavate. I can offer more in depth review and discussion in a support case if needed.

    Microsoft Dynamics 365 Implementation & Support | Cloud ERP Consultant

    I am an expert at Payables. I was the SME for Microsoft GP Support Team for the Payables Module before they laid off 90% of the team a couple years ago.  

    I hope this helps.

    Brandon


     
  • SH-06052129-0 Profile Picture
    10 on at
    Brandon,
     
    Thank you for this.
    I definitely questioned a lot of what Azeez had been directing me as many of his SQL scripts didn't even have proper GP table or field names.
    Additionally, I knew that there were no batch numbers when using transaction posting.
     
    I'm semi-retired as most GP consultants are above the age of 65 these days and as such won't be able to run your suggestions for a few days.
    I promised my client that I'll have a response to her (which will also include you) by next week Thursday.
     
    It's odd that I have even less time on my hands now that I've retired but it seems that my days are completely filled with living life.
    I truly appreciate this.
     
    Have an awesome day
    Stephen
  • BJ-09051414-0 Profile Picture
    409 on at
    Hey Stephen, 
     
    It is great to hear back!
     
    I would be happy to help get you back to your retirement and not have to continue working on this problem. 
     
    I look forward to hearing back and hopefully we can connect through a case to take a deeper look and see what we can uncover.
     
    Have a great weekend and hopefully we can get you back into retirement and enjoy living life to it's fullest. :)
     
    Brandon.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 461 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 428

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans