Hi! I have a user event script adding a button to ...
# suitescript
s
Hi! I have a user event script adding a button to a custom record and a client script reacting on the button being clicked. When clicking on the button I would like to display a suiteLet in a pop-up window on that record. Any ideas?
n
@Simon Erséus you probably just need to use: window.open(thatURL); where thatURL is the url of the SuiteLet
s
Will that open up as a pop or a new tab? Would like it to be a pop-up preferably
n
depends how you set up your window.open
this will also depend on your browser configuration too but I'm not sure there's a lot you can do about that.
if you set the width / height that should open it in a popup
s
Great! Thanks, I'll test!
n
window.open("https://www.google.com","hi", "width=200,height=200");
obviously sub out the the google url for yours, you can try that in the console ^^
e
You can alternatively leverage
N/ui/dialog
or something like a jQuery UI dialog for this purpose
s
@NElliott worked like a charm! Thanks for the advice! @erictgrubaugh have limited experience of the n/ui/dialog module but does that module support this kind of action without adding jQuery or similar?