Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

AP - You can't choose this document because it is part of a recovered batch or still in the process of posting

(0) ShareShare
ReportReport
Posted on by 19

7220.JPG

Hi - my new company is currently using Dynamics GP 2015 - I have found that there are a lot of unapplied payables. I tried to apply them but I keep on receiving this error message. I have checked the batch recovery and found none. I also run the below scripts and not of them worked.. I  have also look into table PM10000 and also found nothing. It is actually 2000 unapplied payables. If there is someone here who can teach or show me how to clear even just one payable, I will really really appreciate it. Thank you in advance for the assistance.

SELECT * FROM [DYNAMICS].[dbo].[ACTIVITY] ORDER BY USERID

SELECT * FROM [DYNAMICS].[dbo].[SY00800]

SELECT * FROM [DYNAMICS].[dbo].[SY00801]

SELECT * FROM [TEMPDB].[dbo].[DEX_LOCK]

SELECT * FROM [TEMPDB].[dbo].[DEX_SESSION]

If any records are returned run this.

DELETE [DYNAMICS].[dbo].[ACTIVITY]

DELETE [DYNAMICS].[dbo].[SY00800]

DELETE [DYNAMICS].[dbo].[SY00801]

DELETE [TEMPDB].[dbo].[DEX_LOCK]

DELETE [TEMPDB].[dbo].[DEX_SESSION]

Categories:
  • Suggested answer
    Isaac Olson Profile Picture
    on at
    RE: AP - You can't choose this document because it is part of a recovered batch or still in the process of posting

    Thank you Gavin and Richard for your comments.  I agree that those are both good steps to try in a test company with a copy of live or after making a restorable back up with no users in the system to clear this error.  

    KB - Set up a test company that has a copy of live company data for Microsoft Dynamics GP by using Microsoft SQL Servererver

    This issue can also occur due to having the same document in both work and open tables (Unposted PM10000 and Posted table PM20000) .  In order to resolve the issue, you basically need to delete the record from the PM10000 work table.

    I just wanted to add one more scenario that I have seen cause this error.  (This is more likely not your issue if you say that there are no records in the PM10000 table, but I wasn't sure if that is what you meant or not in your initial description of the issue.  

    We can see this error if there was a posting interruption initially and the transaction exists in both the PM10000 and the PM20000 table

    Again, please only do this if you are in a test company with a copy of live:

    1.  First, run these scripts to see if you get 1 record returned for each script, to verify that the invoice exists in both the open and work trx tables:

         SELECT * FROM PM10000 WHERE VCHNUMWK = '00000000000XXXXX'

         SELECT * FROM PM20000 WHERE VCHRNMBR = '00000000000XXXXX'

         SELECT * FROM PM00400 WHERE CNTRLNUM = '00000000000XXXXX' --verify DCSTATUS=2

              --Modify the voucher number in each script  

    2.  If you get 1 result for each script above, then run this script to delete the one in work:

          DELETE FROM PM10000 WHERE VCHNUMWK = '00000000000XXXXX'

    3. Now test applying again to verify the message is gone.

    Thanks,

    Isaac Olson

    Microsoft Support

  • Richard Wheeler Profile Picture
    75,842 Moderator on at
    RE: AP - You can't choose this document because it is part of a recovered batch or still in the process of posting

    You could also try this:

    1) Perform backup

    2) Using SSMS DELETE [dbo].[PM00400] on your company database

    3) Run Check Links on AP Open and Historical tables. This will result in a long list

    4) Hopefully this restores the batch containing these records

    5) Review this batch and either post or delete it.

    Do this with no one in GP.

  • Gavin Profile Picture
    2,444 on at
    RE: AP - You can't choose this document because it is part of a recovered batch or still in the process of posting

    Hi,

    I'm fairly sure that when I've had this in the past its because of stranded records in the PM20100 table. (this holds information that would be later printed on the remittance advice)

    Therefore check this table and if records exist for these documents remove them - I'd test one first. (also take a backup first - for a backup I tend to do a SELECT * INTO PM20100_BACKUP FROM PM20100 and then add a WHERE clause that captures the rows you are deleting. Then you can always reinsert them quickly if needed)

    Hope this helps.

    Thanks

    Gavin

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,157 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,938 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans