- 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 06:48 AM
Hi,
It is recommended to have only 1 workflow on sc_request table
This is OOB Service Catalog Request.
If you disable it this will impact your entire platform.
Ideally you should have workflows on your catalog item and not Request table
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 07:03 AM
Hi,
It is not working not mapping any value on request form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2020 07:17 AM
Hi,
Is your workflow on catalog item i.e. sc_req_item then the above should work provided you are using valid variable names and valid field names on REQ
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 09:08 AM
Hi Ankur,
Above code is not setting the location.