- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 08:15 PM
Hi All,
I have a requirement to convert incident to request, for this I am using oob create request ui action but with this I need to copy few fields data from incident such as caller to requested for, short description of incident to short description of catalog item there are around 11 catalog items for which I have to configure this, can someone please guide me how this can be achieved? Its kind of urgent requirement from the client.
Thanks,
Ashwini
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2023 02:57 AM
try to set session variable and then use it in client script
You can add below code in your ui action
gs.getSession().putClientData('caller_id', current.caller_id);
To take these value in your catalog item you have to write a catalog client script.
You can use the below method to get those value
var user = g_user.getClientData('caller_id');
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 08:41 PM
Hello Ashwini,
Please follow the below community link -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 11:30 PM
Hi Nayan,
Could you please explain me what can be given here - "sysparm_instance_id'
I am using below code in ui action -
var url = "com.glideapp.servicecatalog_category_view.do?sysparm_parent=1808f7381ba055505e38ff3f034bcb3c&sysparm_catalog=e0d08b13c3330100c8b837659bba8fb4&sysparm_catalog_view=catalog_default&sysparm_view=catalog_default&sysparm_processing_hint=setfield:request.parent=";
url += current.sys_id;
action.setRedirectURL(url);
current.incident_state = 8;
current.active=false;
current.comments = 'Incident will get Cancelled and new service request will be created - please validate any missing values in new task';
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 11:34 PM
anyhow the REQ record will have the parent field populated with INC reference.
why not use that in before insert BR on REQ and set the short description etc and other fields of REQ using that parent field?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 11:38 PM
I haven't reached till request in the requirement, I need to copy incident details before creation of request just on click of create request ui action it redirects us to catalog item ui where we fill details and submit catalog item in those details incidents data should come as copied