Recent posts:
Recent replies:

I'm not sure if I'm correct here but I think you can eliminate 2 for-loops and the call to getArticle():

In SD031 there should be only one key for "x" (should be a 1:1 relationship), also try to avoid setting up a list just to .count() to see if "dataExists". You should use something like $data (in ^SB02906 there could be one dataset for every item you sale, for every customer). That should speed everything up a little.

My approach:

set a = $order(^SD031S("0","7",x,a))

        if (a '="") {

            set b = $order(^SD031S("0","7",x,a,b))

            if (b '= "") {

                if ($piece($get(^SD031("0",a,b,1)),Y,9) = x) {

                    set c = a

                    set d = ""

                    for {

                        set d = $order(^FA060S("0","22",c,b,c,d))

                        if (d = "") { quit }

                        if ($piece($get(^FA060("0",c,d,2),""),Y,25) = b) {

                            #dim innerObject = ##class(%ZEN.proxyObject).%New()

                            set innerObject.d = d

                            set innerObject.c = c

                            set k = $o(^SB02906("0",c,d,""))

                            if (k'="") {

                                set innerObject.dataExist = ($d(^SB02906("0",c,d,k,"EUR","0","1"))'=0)

                            } else {

                                set innerObject.dataExist = 0


                            do responseList.Insert(innerObject)






Also that caching problem should not exist in production because FA060 and SD031 are read for almost everything in your ERP so it stays in the cache. Otherwise you probably need to create a background-job that reads a few global-nodes every 5-10 minutes to get it cached.

I reinstalled my machine. Somehow Windows Updates didn't installed as well before. I wish I could check these Kaspersky-Logs, but now it's too late. Maybe it's really something that they prevented. Nevertheless our group-policy should've uninstalled it months ago. Didn't work either. 

So a clean install of Windows 10 was a good solution here. 

I already saw that post. I should've scrolled further. There was a msiexec.exe frown

But now I have the "Cache initialisation finished-problem"

Edit on post coming as soon as I have the error.

Jochen has no followers yet.
Jochen has not followed anybody yet.
Global Masters badges:
Jochen has no Global Masters badges yet.