How can I create a task for selected rows from a custom table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2024 05:00 PM
I am working on a project where I have created a custom table in ServiceNow. The table has about 8 columns. I have also created a UI Action (button) under the list called "Submit Changes". The idea is, when a user who has access to this table selects certain rows of the table, and clicks on Submit Changes, a task will be created for our applications support team with the data from the table. Lets say 4 rows were selected and submitted, the task will need to show the 4 rows in the task.
In my UI Action just as a test to see if it will create a task for each row, I added the following code but this doesnt create a task at all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2024 07:51 PM
Could you please elaborate . The idea is, when a user who has access to this table selects certain rows of the table
If you using list layout and selecting the rows you need to use the client script in UI action
var checkedList = g_list.getChecked();
Use the script include to pass the sys id and create the task accordingly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2024 09:21 AM
Lets say the table has 5 rows of data. If I select rows 1 and 2, then one task will need to be generated with a description "Task to XX" and in the task, I would like to display rows 1 and 2.