Need to Update catalog variables in RITM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2023 10:26 PM
Need to Update catalog variables in RITM.
These catalog variables are stored in item_option_new table, but not on requested item table sc_req_item.
These variables should get updated when record producer is submitted(same variables filled in RP) or from generated HR LE Case(all those variables avail in this table too).
Can someone please share any script to map these catalog variables.
@Ankur Bawiskar @Community Alums @Allen Andreas @AndersBGS
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 12:27 AM
You have to use the script while creating the RITM itself,
- Create the RITM and get the sys_id in to a variable
- Use the script to map the variable to the RITM
Regarding variable values, yes you can access the values from HR LE Case as the values are mapped to it directly from the RP.
Thanks,
Anvesh
Anvesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2023 12:51 AM
Hi Anvesh,
May i know the above script which you shared will work for mapping variable to RITM?
Im little confused at the point of "ritm sys id" to what to be added there.
And to map variable values from HR LE case to REQ item, can i use below script.
Im using req_item table and before insert BR
(function executeRule(current, previous /*null when async*/) {
var hr= new GlideRecord('sn_hr_le_case');
hr.addQuery('sys_id', current.parent.sys_id);
hr.query();
while(hr.next()){
current.u_contact_number=hr.u_contact_number;
current.u_subject=hr.u_subject;
But as said above, to map values directly, ritm variables are in item_option_new table but not in sc_req_item.
Can you please help with the script part on how we can achieve this.
Thank you!!
