Question / Problem
I am using portal.show event in the system wide JavaScript customization. But this event only works on the default portal. When I move to my second or third portal, event does not fire. If I go back to my default portal, event fires.
Is there any way to make this event fire on other portals too?
Code / Attempts
I used this simple code just to check when the event fires (it shows a dialog):
(function () {
"use strict";
kintone.events.on("portal.show", async () => {
const result = await kintone.showConfirmDialog({
title: 'Popup',
body: 'JavaScript initiated',
showOkButton: true,
okButtonText: 'OK',
showCloseButton: true
});
});
})();
A dialog appears when portal event fires.
Desired Outcome / Expected Behavior
I want dialog to appear when other portals are shown too.
If there is also a way to know which portal triggered the event (portal2, portal3 etc), that would also be helpful.