Ankur Bawiskar
Tera Patron

@Patrick Tipps1 

that line at line 7 is server side and won't work in client side.

you can use GlideAjax and then invoke that line in script include

How to use UI Actions in Workspaces 

Note: if you are in scoped app then that script include should be made Accessible from All Scopes, then only Ajax works

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post