window object not working in UI Action button click

rsadhula
Mega Contributor

Hi I'm trying to use window object in UI Action but getting error: Uncaught TypeError: Cannot read property 'open' of null

please don't ask me to enable this: glide.script.block.client.globals. Let me know if we have any alternate options

function print(){
window.open("https://www.google.com","_blank"); // Uncaught TypeError: Cannot read property 'open' of null
}

Thanks

 

1 ACCEPTED SOLUTION

You can either add it on your list layout of UI Actions by configuring using the gear icon for personalizing list Or Add it on your UI Action form layout by configuring from top of header. Configure -> Form Layout

View solution in original post

6 REPLIES 6

Alikutty A
Tera Sage

Hi,

Are you in London? If Yes you need make Isolate script field to FALSE on your UI action to get a window objects executed. You can do it from a list view and then it will work.

Read more about Isolate Scripts in here

Hi,

there is no option in UI Action called Isolate script field, can you please let me know where do I need enable that.

You can either add it on your list layout of UI Actions by configuring using the gear icon for personalizing list Or Add it on your UI Action form layout by configuring from top of header. Configure -> Form Layout

BK9
Tera Contributor

Hi,

I can't seem to get this to work for me.

When I URL to the email client template for the u_client_mail_type=assigned_to all is working fine. However, when I URL to u_client_mail_type=user I get a default template. I've added the u_client_mail_type conditions to both separate templates. Please advise.

What could I be missing?

Template1

&sc_request.u_client_mail_type=user

find_real_file.png

Template 2

&sc_request.u_client_mail_type=assigned_to

find_real_file.png