- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 05:37 AM
I have created three variable Requested for, location, description.
now I need to map these variables to request fields using Run script. or any other recommended way for mapping.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 06:14 AM
Hi,
Please use this script in your workflow of catalog item
var req = new GlideRecord('sc_request');
req.get(current.request);
req.requested_for = current.variables.requested_for;
req.location = current.variables.location;
req.description = current.variables.description;
req.update();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 05:59 AM
you can add below to run script on cat item workflow.
//Set Parent Request Short Description//
var reqParent = current.request.getRefRecord();
reqParent.xxxxxx = current.variables.xxxxx;
reqParent.autoSysFields(false);
reqParent.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 06:11 AM
Hi,
workflow table is sc_request and i want set the fields of request form only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 06:14 AM
Hi,
Please use this script in your workflow of catalog item
var req = new GlideRecord('sc_request');
req.get(current.request);
req.requested_for = current.variables.requested_for;
req.location = current.variables.location;
req.description = current.variables.description;
req.update();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 06:44 AM
i think OOTB Workflow is affecting, how can disable OOTB 'Service Catalog Request' for this catalog item and only make custom WF to run