system.db.runNamedQuery() broken in 8.3?

When I briefly updated to 8.3, one of the first things I noticed was that system.db.runNamedQuery() wasn’t just deprecated, but seemed to be broken. I thought that what I had seen was that the Gateway-scoped version of it (the one with project parameter) was throwing errors. Is that accurate? And what is the recommended approach for smooth migration? I can’t just switch to 8.3 and then start changing the hundreds of instances that exist, nor can I change them before making the switch or it will break our current system.

I understand the need to deprecate, given the confusing nature of the scope issue. Since many of my library scripts are invoked from both Gateway and Project scope, I usually would include the project name, since that has worked for both scopes. But unless I’m missing something, the word “deprecated” seems very misleading. That usually means it still works, but there’s a new, better way.

I'm not finding anything about runNamedQuery being broken.

Have you tried it? Got a link to a post about it?

It is definitely not expected that runNamedQuery doesn't work on the gateway scope. The exact nature of any errors you were encountering would be very helpful.

The intended nature of the deprecation is exactly what you expect: the function is discouraged from use by a more modern alternative that fixes the underlying issue, but existing code absolutely should still work.

The two functions call exactly the same code path:

1 Like

Hm, I’ll have to try setting up a separate instance of 8.3 to see what exactly the error was. We were moving to a new server, so I thought I’d take that opportunity to make the upgrade, but given those errors (whatever the cause) and the fact that our users didn’t get imported, I decided to switch back to 8.1. But we still have that old server I should be able to test with…