Button Trigger in ServiceNow Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2024 10:04 PM
I am currently Customizing a new page in ServiceNow workspace. For the i have an button in that Workspace when i click that button i have to trigger that one event in Script Includes.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2024 06:24 AM
You can't directly call a script include from inside UI Builder. You'd need to create a new transform data resource that calls the script include and then execute that data resource from your button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-30-2024 06:41 AM
Receiving the Dummy Value: The client sends a request to the server with a dummy value, which is extracted from the request payload.
Updating Records: The ScriptInclude queries the alm_hardware table for records with a state of 1 and a null assigned_to field. It then updates the assigned_to field of each matching record with the provided dummy value.
Returning the Response: After the update process, the system sends a success message back to the client, confirming the update of the alm_hardware table and providing the dummy_value used for the update.