- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2022 02:01 AM
When request is created the Short description is not set to the short description on the catalog item on submit.
How can this be achieved without using the Workflow.
I want to set the Request short description to the short description user entered while submitting the form.
This short description on the RITM is populating, I want to populate the Request. so that.
The short description on Request = short Description on RITM;
Thanks in advance,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2022 03:12 AM
This was populating the Request form Name
I wanted to get the vriable value on the form and submit it on the request.
I made these changes and it worked for me:
var req = current.request.getRefRecord();
req.short_description = current.variables.short_description; /* made this changes and it worked as
expected for me*/
req.update();
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2022 02:06 AM
Hi you can use a after insert BR on ritm table to set request shortdescription
var gr = new GlideRecord('sc_request');
gr.addQuery('sys_id', current.request);
gr.query();
if(gr.next())
{
gr.short_description = current.short_description;
gr.update();
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2022 02:14 AM
Hi,
you can use after insert BR on RITM table
Script:
var req = current.request.getRefRecord();
req.short_description = current.short_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
‎07-29-2022 03:12 AM
This was populating the Request form Name
I wanted to get the vriable value on the form and submit it on the request.
I made these changes and it worked for me:
var req = current.request.getRefRecord();
req.short_description = current.variables.short_description; /* made this changes and it worked as
expected for me*/
req.update();
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2022 08:18 PM
Hi,
The script I shared will also work fine since you are already populating the variable value into RITM short description which in turn will get copied to REQ short description.
Would you mind marking appropriate response as correct?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader