How can we make variables visible on catalog task which are created through Run script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2016 10:19 PM
Hello Everyone,
I have worked on the generic workflow where catalog task are created through the run script.
Now I need help how can I make variables visible on the catalog task in script.
Here is the script were catalog task are created:
while (gr.next()) { | ||||
if(workflow.scratchpad.count == count) { | ||||
var task = new GlideRecord('sc_task'); | ||||
task.initialize(); | ||||
task.request_item = current.sys_id; | ||||
task.assignment_group = gr.u_assignment_group; | ||||
task.priority = gr.u_priority; | ||||
task.short_description = current.request.requested_for.getDisplayValue() + ' - ' + gr.u_short_description; | ||||
task.description = gr.u_description; | ||||
task.state = 1; | ||||
task.insert(); | ||||
} |
Thanks
Alekhya N

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2016 11:42 PM
Hi Alekhya,
There is a table called [sc_item_variables_task] that relates a TASK to the variable definitions in [item_option_new] that it is able to view. To see a variable on your TASK, create a record in this table for your task for each variable you wish to make available.
Also note: an option record [sc_item_option] must have been created for your parent RITM using the same variable definition as above, and is related to your RITM via the Variable Ownership table [sc_item_option_mtom].
Thanks,
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2016 10:57 AM
Hi Alekhya,
On variable definition, there is a 'global' checkbox field. You need to check it so that it is appears of catalog tasks as well.