Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to convert my Ui action client script to Workspace client script?

HARI KISHAN GVS
Mega Sage

Hi Team,

I have a UI action Called 'Delete Comment' which is working fine in the Instance side.

i need to make that Ui action visible in Workspace side as well and make it work on the CSM/FSM configurable workspace as well.

Can anyone please help me on this?

Here is my UI action:

HARIKISHANGVS_0-1699544075276.png

I tried checking the Workspace Client and started adding the script lines.. but i am not able to going forward as my scripting knowledge is lesss..

HARIKISHANGVS_1-1699545450681.png

Can anyone please help me on this ? please help me with the script part..

i have attached the UI page, Script Include i have used for my UI action functionality. Please have a look.

Thanks in advance,

Hari Kishan.

3 REPLIES 3

SANDEEP28
Mega Sage

@HARI KISHAN GVS Below should be the syntax

 

var ui_page_id = '<sys_id_of_your_ui_page>';
    g_modal.showFrame({
        url: '/ui_page.do?sys_id=' + ui_page_id,
        title: 'Attachments',
        size: 'xl',
        height: 500
    });

 

Also refer g_modal section of below article. Its really helpful

 

https://www.servicenow.com/community/next-experience-articles/how-to-use-ui-actions-in-workspaces/ta...

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

Hi Sandeep,

for calling the UI page it's working but i have a client script in my UI page, That is not working in CSM/FSM configurable worksapce.

after clicking the OK button, Nothing is happening..

Thank you,

Hari Kishan.

tomasscerba
Mega Sage

Hi @HARI KISHAN GVS ,

 

im not by the computer, but doesnt action UI script have the options at the bottom to make it available in workspace also? 

Please mark helpful if it helped.