If I run this "system.perspective.openPopup" command directly on the button it works, but when trying to invoke it using the Session Message Handler, nothing happens.
Any help or guidance to get this to work would be greatly appreciated.
Thank you in advance
Sire it is, it's provided by the msg event. But this is the entire object, should be getting the id from it as that's what the sessionId param is after
Well, I still believe that session parameter passed to openPopup is the source of the issue, though now I can't tell what error would appear in the logs.
The sessionId parameter shouldn't be needed anyway, it should default to the current session... right ?
Yes. It should just be omitted unless it's a Gateway Message handler, then it must be included because of this:
[1]This function will only work in the Gateway scope if both sessionId and pageId are supplied to the call.
Personally, I'm a little confused as to why a message handler needs to be used here at all. Just use system.perspective.openPopup() Even if you're going to be brodcasting to all active sessions, you don't need a message handler.
No, it isn't. system.perspective.openPopup() can target a page in a session if you hand it the session ID and page ID in keyword arguments. This can be called from gateway scope outside Perspective scope.
I ended up using "system.util.sendMessage()" instead of "system.perspective.sendMessage()", parsing the "sessionId" and "pageId" in a payload, and using those parameters in the "system.perspective.openPopup()" within the Session Message Handler.
Just for reference, see screenshots of working code: