SOW Workspace – Related List Declarative Action Client Script Not Executing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi Everyone,
I am trying to create a Related List Action in Service Operations Workspace (SOW) using a Declarative Action / Related List Action.
My requirement is very simple for now: I just want to create a Related List button and execute a client-side script when the button is clicked. As a first step, I am trying to display a simple alert message to confirm that the client script is being executed.
What I have done
- Created a Related List Action / Declarative Action.
- Selected the appropriate table used by the related list.
- Set Implemented As = Client Script.
- Added the action to the SOW related list.
- The button is successfully visible in the SOW related list.
However, when I click the button, nothing happens.
For testing, I tried a simple script such as:
function onClick() {
alert("Hello");
}But the alert is not displayed.
I have also tried using:
function onClick(g_form) {
alert("Hello");
}but I am still not getting any response when clicking the button.
My question
What is the correct way to configure a Related List Declarative Action in Service Operations Workspace (SOW) so that a Client Script executes when the related-list button is clicked?
Could someone please provide a minimal working example where clicking the Related List Action displays:
alert("Hello");I would also like to understand:
- Should Implemented As be set to Client Script?
- Is there any additional configuration required for the Client Script?
- Do I need an Action Payload Definition when using Client Script?
- What should the correct client script function/signature be?
- Is there any additional configuration required specifically for SOW?
- If Client Script is not the correct approach, what is the recommended way to execute client-side logic from a Related List Action in SOW?
Once I can get a simple alert() working, my next step will be to replace it with my actual client-side logic.
Any step-by-step guidance or a minimal working configuration would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
did you check any OOTB Related list action and compare?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
OOB there is no declarative action on related list which is implemented as client script.
But in yokohoma we build one and it is working fine. Once version is upgraded to australia its not woking.
i checked with other table's declarative action related list implemented as client script no changes found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Hi ,
Share screenshot of your configurations.
Refer following articles to learn more about declarative actions:
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
@NeethuB ,
Can i Know your instance version, because i have tried in Australia version.
I have kept simple alert message in client script, it works for me.
Thanks,
Dinesh
