Is utils.openPage Not Available in JS Queries?

I'm working with a multi-page app, and I can clearly see utils.openPage() as an available action when setting an Event Handler with the action set to "Go to page" in a component. However, when I try to use this function directly in a JS Query, it doesn’t appear in the available functions list—unlike openApp and openUrl. Moreover, even if I try to call it manually, it doesn't seem to work.

Is this the expected behavior, or am I missing something?


Hey @jaey,

I just tested this both manually and with an event handler attached to a button, and both worked fine—loading the correct page. Not sure why it's missing from the function list; I don’t see it on my end either. Let me know if this solves your issue! If not, feel free to share more context, and we’ll try to figure it out! :smiley:

Screenshot 2025-03-05 at 10.45.51

2 Likes

Oh, really? I've tested openPage multiple times, but it doesn't seem to work on my end. As a workaround, I'm currently using openApp with the { pageName: ... } option, which seems to be the only viable solution for now. It would be great if openPage could be properly referenced and work within JS Queries as well.

1 Like

Hey @jaey! There does seem to be an issue with the linter, but utils.openPage should still work - even though the UI makes it appear unsupported. I'll let the team know and provide an update here as soon as I have news to share!

With that in mind, there's no real advantage to using openPage over openApp. The former actually utilizes the latter in our code base, so your current "workaround" is perfectly valid. :+1:

Have you had a chance to test this out, @jaey? Let us know if you have any additional questions!

I stumbled on this thread due to the same problem and can confirm that:

  1. The linter/intellisense tells me utils.openPage doesn't exist
  2. It exists

Mine was a page-level JS query. As a global JS query it was happy.

1 Like