I want to add a record to a related list via script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 01:35 PM
I have a variable (referencing: cmdb_ci_computer) on a catalog item, and I would like to add the referenced computer to the "affected CIs" related list on the requested item record. I don't know how to refer to the related list in my script.
Specific use case ... after the last task in the requested item workflow is completed, I want to make the entry to the appropriate related list on the RITM being completed.
Thanks!
- Labels:
-
Service Desk

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 02:31 PM
Try to get the related_list_table_name from the list control of the related list. Right click related list header > Personalize/Configure List Control. Copy the value from the field 'Related list'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 02:39 PM
Thank you. That helps. Now I just need to figure out the syntax for adding to (not overwriting) any existing entries on the list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 02:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 02:51 PM
Yes, thank you. I can work with that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2019 03:00 PM
Actually, as I look closer, that script is not adding to existing, it's creating a new entry.