I may have asked this in the past, I have a custom...
# suitescript
a
I may have asked this in the past, I have a custom html suitelet. When a user click on a certain button, I use window.open to open a new tab to a pdf stored in the file cabinet. However the users get messages from chrome saying it blocks pop ups. What is the solution for this? The pfd is in the same url domain as the the page they were on.
b
depends on your code
the general rule is that a user's action must directly trigger the code that opens the window
otherwise its a popup
a
Well its direct in that the user clicked the button, but it first needs to generate the pdf
b
considering that you cant do that clientside, that doesnt sound very direct
again, no code gets you guesses
a
Its too much code to post. But what are you saying makes sense
My solution was that if the window.open returns null, alert them they need to allow the popup to move forward
b
probably is a time limit too, so that too much code just cements the no longer direct thing
you may want to just make the button open a suitelet that does the work instead