- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2024 04:01 PM - edited 09-06-2024 10:35 AM
We have a Workspace template (CSM) which is read only in UI Builder, and i created a Button on the list view, which performs some changes to selected record.
BG of the button logic:
I achieve it by creating Action Assignment (Implemented as a Client script), added this action to List of Action of UX Actions Configuration, and utilized g_list.getChecked() with Ajax for record update (client scripting).
So we have functioning button, we just need to add success/info/error message to show results of this action.
g_form[method] is not available in this environment, gs[method] from Ajax not affecting UX/UI of Workspaces, g_list seems to not have this message functionality, and template is read only (cant add/edit in UI Builder)
Solution with modal or alert popup is not desirable.
The OOB Edit button in work space has this functionality, it shows success message after updating records, but i couldn't figure out where is the scripting of this button to copy solution from.
Any thoughts ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2024 12:01 PM
Ok i belive i found a solution for you 🙂 Spent quite a few hours looking at this, kinda annoyed me that it was not possible, but this workaround should hopefully be enough.
What i did was create a script include called ListMessageHandler which can then call gs.addInfoMessage and then upon returning to the client script, refresh the related list, this will cause the message to appear.
Script Include:
Client Script:
Result:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2024 02:59 PM
An Action Assigment implemented as Client Script works fine for me:
My action is set up as a related list action, but i dont think that has anything to do with it.
From what i can see, the intelisense does not show g_form to be usable, but using it like this:
I know it's not a success message so to speak, but it should still be fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2024 06:40 PM - edited 09-06-2024 07:15 PM
Thank you for the reply, but unfortunately that's not working for List view (unlike Related list)
"Complete" button in a list view :
result onClick:
Button setup:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2024 01:33 AM
**bleep**, thats a shame. Looking at the GlideList documentation for the now experience, i only see them using alert in their example.
https://docs.servicenow.com/bundle/xanadu-api-reference/page/app-store/dev_portal/API_reference/Glid...
So this might be the only way to do things for the moment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2024 12:01 PM
Ok i belive i found a solution for you 🙂 Spent quite a few hours looking at this, kinda annoyed me that it was not possible, but this workaround should hopefully be enough.
What i did was create a script include called ListMessageHandler which can then call gs.addInfoMessage and then upon returning to the client script, refresh the related list, this will cause the message to appear.
Script Include:
Client Script:
Result: