- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 09:30 AM
I have a BR to update the REQ short description on SC_request table..
==============
After - Insert
(function executeRule(current, previous /*null when async*/) {
var usrarray = [];
var item = new GlideRecord('sc_req_item');
item.addQuery('request',current.sys_id);
item.addQuery('cat_item','57be3d29b7121010189e22b5de11a937');
item.query();
if(item.next()){
var almhw = new GlideRecord('alm_hardware');
almhw.addQuery('sys_id','IN',item.variables.assets.toString());
almhw.query();
while(almhw.next()){
usrarray.push(almhw.assigned_to.getDisplayValue());
}
current.short_description = "Hardware Asset Refresh Order for User(s) - " + usrarray;
}
})(current, previous);
This is working fine and populating the SHORT DESCRIPTION as expected in sandiego.. But it's not populating the same in Utah instance after upgrade. Any thoughts?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 10:11 AM
Since its After BR record must be updated using "current.update()".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 08:55 PM