Glidrecord or GlideAjax from UI action workspace client is not working

Sunny32
Tera Contributor

Hello All,

 

I am trying to configure a UI action that will run on the workspace view of a record. I understand that to execute the code in the workspace, we need to use the workspace client script. Therefore, I have written the following code to call a client-configured script include. Details are provided below:

 

Script include:

Sunny32_0-1732787483251.png

 

workspace UI action:(worspace client script)

Sunny32_1-1732787634460.png

 

I have created a basic script to test the script include call, but I'm not sure why the script include is not being invoked from the workspace client script within the UI action. Am I missing something?

 

The same script include can be invoked from On chnage client script. This works correctly.

 

Note: Script include and UI action both are in the same application scope.

#workspace #workspaceUIAction

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Sunny32 

script include and UI action both are in same scope?

Simply add alert at line2 before GlideAjax to check if alert comes? If alert doesn't come use console.log() and see if it came in browser console.

remove line 8 and check if log came?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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