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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Very slow posting of sales invoices

(0) ShareShare
ReportReport
Posted on by 32,729

hi,

how can i find out what's the reason is why the posting of sales invoices are gone very slow depending on the nr of sales lines. it can last up to 20min per posting! we have made a performance tracing of the posting using sql profiler. it resulted out, that one statement is run over 3.000.000 times during posting:

SELECT  TOP 1 Null FROM "dbo"."Value Entry" WITH (UPDLOCK, ROWLOCK)   
WHERE (("Item Ledger Entry No_"=10000)) AND (("Item Charge No_"<>''))

how can i found out whats the according c/al code and where to find it. unfortunately it's a Nav 4.0 and there are no OMA Tools to check (where used, ...).

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Jens Glathe Profile Picture
    6,092 on at
    RE: Very slow posting of sales invoices

    Hi Jonathan,

    you could use the client monitor and enable trace SQL statements. But to make this short: "Select Top 1 NULL" is most probably an ISEMPTY statement in NAV. I would start my search in CU22.

    However this got me curious: I found this blog entry here. www.navision-blog.de/.../navision-performance-optimierung-auf-dem-sql-server

    For the search, I would look to Stati-Cal PRISM. It is pretty useful. Regarding the probable cause: 3M Entries sound like an awful lot. Something recursive perhaps? Is it always the same item ledger entry no. ? Hmm... a search on setfilter("Item Charge No.".'<>%1','') ? This finds only 4 occasions in the whole NAV4.0 code - all in CU5813..5816, "Undo Shipment" type, in function CheckSalesShptLine()... any chance that this gets called on a sales posting? There is no link to it... The interesting part, however, is that this structure (do an isempty on value entry for item ledger entry no., with an item charge) should be fairly seldom.


    with best regards


    Jens

  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: Very slow posting of sales invoices

    it turned out that it was an ugly custom code for statistical purposes that ran crazy.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans