- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 09:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2018 05:49 AM
Hi leahp
In the create change task choose set values and set your state and initial assignment group etc then go to the advanced section
Tick the advanced box
Add the line
workflow.scratchpad.sys_id = task.sys_id;
What this does is passes the sysID of the created change to the scratchpad
Then go to your change task script and in the advanced section add
var sys_id = workflow.scratchpad.sys_id;
task.change_request = sys_id;
What this does is retrieves the sysID of the Change you created and sets the change task change_request field with it.
I mocked this up like yours and it creates fine
Hope this helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 09:23 AM
Hello Leahp,
I'm assuming the workflow is defined on the "sc_task" table. If yes then in this case to pass the change request values to task, you will have to first query the change request record via GlideRecord and then set the values in change task.
Thanks,
Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 09:26 AM
The workflow is against a RITM User submits a RITM, which generates a catalog task. Once catalog task is closed, create a change request and a change task. That is where I am running into trouble.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 11:22 AM
Hi leahp
Do you want to create a change every time you close an item? Have you considered a simple ui action on the catalog task form if it's discretionary?
But sticking with the workflow for now could you do a screenie of your workflow, just need to understand what objects you are using to create the various records
Assume you are doing create task for the catalog task then 1 maybe 2 run scripts that generate the other records and link them?
Pop the various scripts in too so we can see what you're doing
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 11:33 AM
Here is a screenshot. User submits a catalog item. A Catalog task is created and assigned to a group. When that task closes, we need to have a change request and a change task (there could be more than one based on inputs - I am just trying to get one to work). I would like for the change task to be populated with information from the change request (short description, assignment group, company, configuration item to name a few
I have a workflow that will create a change request when a catalog task closes. In addition to the change request, I need for it to open a change task, propagating specific information from the change request to the change task, specifically the fields listed below:
Configuration Item
Change Request #
Company
Short Description
Assignment Group
Assigned To
Set due date to 5 days out.
Below is script I have. The only thing working is the due date.
task.change_request = current.getValue('sys_id');
task.cmdb_ci = current.getValue('cmdb_ci');
task.assignment_group = current.assignment_group;
task.assigned_to = current.getValue('assigned_to');
task.short_desccription = current.short_descrirption;
task.company = current.getValue('company');
task.u_category = 'Hardware';
thoughts?