- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:45 PM
I have Created a catelog item.
When the catelog item submits I want to set defalut values to some fields. I created a workflow using sc_request , but it is not shown in the catelog item.
I want to set these values in request form. But iam not able to add this workflow to my catelog item. Becouse this workflow is created using sc_request table.
Please help me.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 02:02 AM
Why you want to create the workflow on request?
Create it on RITM and then in the workflow you can use Run Script activity to set the required values on request form.
Script for Run Script activity
var grReq = new GlideRecord('sc_request');
grReq.get(current.request.sys_id);
//Replace your field and values as per the need.
grReq.cmdb_ci = '261b2b426fb4110015c9181d5d3ee413';
grReq.impact = '3';
grReq.short_description = 'THIS IS TEST TICKET' ;
grReq.update();
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:49 PM
Hi,
Without anything shared how you think anyone can help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 12:00 AM
please check my screenshots

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 02:02 AM
Why you want to create the workflow on request?
Create it on RITM and then in the workflow you can use Run Script activity to set the required values on request form.
Script for Run Script activity
var grReq = new GlideRecord('sc_request');
grReq.get(current.request.sys_id);
//Replace your field and values as per the need.
grReq.cmdb_ci = '261b2b426fb4110015c9181d5d3ee413';
grReq.impact = '3';
grReq.short_description = 'THIS IS TEST TICKET' ;
grReq.update();
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 06:56 AM
Thanks this approach works well.