Converting Catalog Items to Change Requests

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2014 09:20 AM
I have a catalog item - ADD Disk - that is completely setup as a Catalog Task. New request is to make the item a change request instead of a task. Beyond changing the Catalog Task to Create Task and selecting CHG_REQuest in the workflow is there anything else needed? Is there a better way to accomplish this?
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2014 10:25 AM
Hi Cindy,
Create a Record Producer catalog item (Record Producer - ServiceNow Wiki). It is just like creating a regular Catalog Item but it allows you to select the target table (in your case Change Request) where the request will be created.
It is very straightforward, just make sure the variable names match the field names in the change request table. Upon the user submitting the request, a record in the target table will be created with no additional tasks or requested items.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2014 11:41 AM
That's the right way but I already have a full catalog created with catalog items. I am hoping to be able to modify the workflow instead of recreating record producers for every item.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2014 01:55 PM
In that case, the other way of doing it is by including a Run Script activity to the workflow and include a script that creates the change request as follows:
var gr = new GlideRecord('change_request');
gr.initialize();
gr.setValue('short_description', current.variable_pool.short_description);
gr.setValue('description', current.variable_pool.description);
gr.setValue('comments', current.variable_pool.comments);
gr.setDisplayValue('cmdb_ci', current.variable_pool.cmdb_ci.getDisplayValue());
...
gr.insert();
Please note that current.variable_pool.short_description is the name of the variable in the catalog item.
Let me know if this helps you and if you have any questions.