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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Posting Purchase Order Not responding

(0) ShareShare
ReportReport
Posted on by

Hi all,

AX is not responding when billing a purchase order (Posting a purchase order). 
As i see some SQL blocks are there, we already cleared them many times. But it's happening frequently.
So please suggest how to fix this permanently (What to check in AX?)

Many thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    Please tell us more about the blocking. Just knowing that you have some doesn't allow us to help you to avoid it.

  • Community Member Profile Picture
    on at

    Hi Martin,

    Thanks for the quick reply.

    These queries are reason for blocking, even though we tried to kill them again it happens.

    I guess one query is blocking the other and both trying to fetch same record at a time causing this issue.

    Please suggest the solution to release the lock and make them work accordingly.

    Query 1:

    (@P1 bigint,
    @P2 nvarchar(5),@P3 bigint,@P4 bigint,@P5 bigint,@P6 bigint,@P7 bigint)SELECT TOP 1 T1.RECID FROM TAXTRANS T1 WHERE ((T1.PARTITION=@P1) AND (T1.DATAAREAID=@P2)) AND EXISTS (SELECT TOP 1 'x' FROM SUBLEDGERJOURNALENTRY T2 WHERE ((T2.PARTITION=@P3) AND ((T2.TRANSFERID=@P4) AND (T2.LEDGER=@P5)))AND EXISTS (SELECT TOP 1 'x' FROM ACCOUNTINGEVENT T3WHERE ((T3.PARTITION=@P6) AND (T3.RECID=T2.ACCOUNTINGEVENT))AND EXISTS (SELECT TOP 1 'x' FROM SOURCEDOCUMENTLINE T4 WHERE ((T4.PARTITION=@P7) AND ((T4.SOURCEDOCUMENTHEADER=T3.SOURCEDOCUMENTHEADER) AND (T1.SOURCEDOCUMENTLINE=T4.RECID))))))

    Query 2:

    (@P1 numeric(32,16),@P2 datetime2,@P3 int,@P4 bigint,@P5 nvarchar(5),@P6 bigint,@P7 nvarchar(5),@P8 numeric(32,16),@P9 nvarchar(21),@P10 nvarchar(21))UPDATE PURCHLINE SET PURCHRECEIVEDNOW=@P1,MODIFIEDDATETIME=@P2,RECVERSION=@P3 WHERE ((PARTITION=@P4) AND (DATAAREAID=@P5)) AND EXISTS (SELECT 'x' FROM VENDINVOICEINFOLINE T2 WHERE (((T2.PARTITION=@P6) AND (T2.DATAAREAID=@P7)) AND ((((PURCHLINE.PURCHRECEIVEDNOW<>@P8) AND (T2.INVENTTRANSID=PURCHLINE.INVENTTRANSID)) AND (T2.PARMID=@P9)) AND (T2.TABLEREFID=@P10))))

    Query 3:

    (@P1 int,@P2 bigint,@P3 nvarchar(5),@P4 nvarchar(21),@P5 bigint,@P6 nvarchar(5),@P7 bigint)UPDATE T1 SET RECEIVENOW=(T1.RECEIVENOW-T3.SUMOFQUANTITY),INVENTNOW=(T1.INVENTNOW-T3.SUMOFINVENTQUANTITY),PDSCWINVENTNOW=(T1.PDSCWINVENTNOW-T3.SUMOFPDSCWQUANTITY),RECVERSION=@P1 FROM VENDINVOICEINFOSUBLINE T1 CROSS JOIN VENDPACKINGSLIPTRANS T2 CROSS JOIN VENDINVOICEPACKINGSLIPQUANTITYMATCHSUM T3 WHERE (((T1.PARTITION=@P2) AND (T1.DATAAREAID=@P3)) AND (T1.PARMID=@P4)) AND (((T2.PARTITION=@P5) AND (T2.DATAAREAID=@P6)) AND ((T2.RECID=T1.JOURNALREFRECID) AND (T2.INVENTTRANSID=T1.DOCUMENTID))) AND ((T3.PARTITION=@P7) AND (T3.PACKINGSLIPSOURCEDOCUMENTLINE=T2.SOURCEDOCUMENTLINE))

    Query 4:
    (@P1 numeric(32,16),@P2 datetime2,@P3 int,@P4 bigint,@P5 nvarchar(5),@P6 bigint,@P7 nvarchar(5),@P8 numeric(32,16),@P9 nvarchar(21),@P10 nvarchar(21))UPDATE PURCHLINE SET PURCHRECEIVEDNOW=@P1,MODIFIEDDATETIME=@P2,RECVERSION=@P3 WHERE ((PARTITION=@P4) AND (DATAAREAID=@P5)) AND EXISTS (SELECT 'x' FROM VENDINVOICEINFOLINE T2 WHERE (((T2.PARTITION=@P6) AND (T2.DATAAREAID=@P7)) AND ((((PURCHLINE.PURCHRECEIVEDNOW<>@P8) AND (T2.INVENTTRANSID=PURCHLINE.INVENTTRANSID)) AND (T2.PARMID=@P9)) AND (T2.TABLEREFID=@P10))))

    Many thanks in advance

  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    Which query is blocking which one, what's the locked resource and what's the type of the lock?

  • Community Member Profile Picture
    on at

    Query 1:

    (@P1 bigint,@P2 nvarchar(5),@P3 bigint,@P4 bigint,@P5 bigint,@P6 bigint,@P7 bigint)SELECT TOP 1 T1.RECID FROM TAXTRANS T1 WHERE ((T1.PARTITION=@P1) AND (T1.DATAAREAID=@P2)) AND EXISTS (SELECT TOP 1 'x' FROM SUBLEDGERJOURNALENTRY T2 WHERE ((T2.PARTITION=@P3) AND ((T2.TRANSFERID=@P4) AND (T2.LEDGER=@P5))) AND EXISTS (SELECT TOP 1 'x' FROM ACCOUNTINGEVENT T3 WHERE ((T3.PARTITION=@P6) AND (T3.RECID=T2.ACCOUNTINGEVENT)) AND EXISTS (SELECT TOP 1 'x' FROM SOURCEDOCUMENTLINE T4 WHERE ((T4.PARTITION=@P7) AND ((T4.SOURCEDOCUMENTHEADER=T3.SOURCEDOCUMENTHEADER) AND (T1.SOURCEDOCUMENTLINE=T4.RECID))))))

    Query 2:

    (@P1 int,@P2 int,@P3 bigint,@P4 int,@P5 bigint,@P6 bigint,@P7 bigint,@P8 bigint,@P9 int)UPDATE ACCOUNTINGEVENT SET STATE=@P1,RECVERSION=@P2 WHERE ((PARTITION=@P3) AND (STATE=@P4)) AND EXISTS (SELECT 'x' FROM SUBLEDGERJOURNALENTRY T2 WHERE ((T2.PARTITION=@P5) AND (((T2.ACCOUNTINGEVENT=ACCOUNTINGEVENT.RECID) AND (T2.TRANSFERID=@P6)) AND (T2.LEDGER=@P7))) AND NOT (EXISTS (SELECT 'x' FROM SUBLEDGERJOURNALENTRY T3 WHERE ((T3.PARTITION=@P8) AND (((T3.ACCOUNTINGEVENT=T2.ACCOUNTINGEVENT) AND (T3.STATUS<>@P9)) AND (T3.LEDGER<>T2.LEDGER))))))

    Query 1 is blocking the Query 2. As i see, select is blocking the update.

    We have checked the Query 1(Select query) running fine, but Query 2(Update) not running.

    Please suggest how to resolve this.

    Many thanks in advance.

  • Martin Dráb Profile Picture
    239,364 Most Valuable Professional on at

    If the reason why you didn't answer my question about which resource is locked is that you don't know it, I think the next step should be collecting this information. You'll find many resource about how to do it in SQL server (here is one example).

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 26

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans