- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2022 12:18 PM
Hi Community,
I have a quick question that i have a feeling has a simple quick answer. I am trying to auto-fill the CI on a catalog task for our onboarding and offboarding workflows. I have the CI created, but cant seem to script the workflow to include this CI on all the tasks that get created. Currently I have a few other things scripted, shown below, but cant seem to figure out how to auto populate the Configuration item. The CIs would be "Onboarding" and "Offboarding" for their respective workflows.
Currently Scripted
Solved! Go to Solution.
- Labels:
-
Script Debugger
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 01:36 PM
You will need to make sure that you have the correct name for the CI field.
It might rather be
task.cmdb_ci = "41444f4a1b433050d7c82f83604bcbc8";
You can check this on the sys_dictionary to confirm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2022 09:09 PM
You can use the same syntax and assign the sys_id of the ci. You will need the name of the CI field.
task.ci = "insert sys_id here”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 12:46 PM
Hi Dustin,
I tried to script it as below, but doesnt seem to be working. The Tasks are still being created with no CI assigned to them.
task.ci = "41444f4a1b433050d7c82f83604bcbc8";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 01:36 PM
You will need to make sure that you have the correct name for the CI field.
It might rather be
task.cmdb_ci = "41444f4a1b433050d7c82f83604bcbc8";
You can check this on the sys_dictionary to confirm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 02:09 PM
Perfect! Ty, this did the trick