How to use both client and server side code in declarative action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 01:34 AM
Hey all,
I have a ui action(find the code below), which is working as expected. And it contains both server side and client side script. I wish to configure same functionality in workspace as well. So i have decided to go with declarative action.
What type of declarative action i should use and how to use both server and client side script in declarative action.
Ui Action:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 04:02 AM
what's your business requirement?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 05:45 AM
hi @Ankur Bawiskar ,
Thanks for responding, please find details below:
The task is to create a UI action called "Group Attest" in the "Downstream Control" related list of the entity. This UI action should only be visible within the related list, not within the individual control records.
Functionality:
- The "Group Attest" UI action should allow users to select multiple controls within the related list.
- The system will then check the state of each selected control.
- If any of the selected controls are in the Draft state, the system will move them to the Attest state.
- Once the controls are moved to the Attest state, a notification will be sent to the Entity Owner to inform them of the change.
Issue in Workspace View:
The functionality works as expected in the native view. However, in the workspace view, the "Group Attest" UI action is not appearing in the related list as intended.
Steps attempted:
- I checked the "Workspace Form Button" and "Workspace Form Menu" checkboxes in the UI action settings. As a result, the "Group Attest" UI action is now showing up in the Control Record itself, rather than in the "Downstream Control" related list.
However, in the declarative action setup, there is an option to define where the UI action should be displayed, which can resolve the issue. But i am not aware on how to use server side and client side script in same declarative action
Ui action:
Entity record:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 04:04 AM
you will lot of OOB UI actions where you can run both Client + Server in UI action in configurable workspace
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader