- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2019 03:36 PM
Hi All,
I would like to copy one of the variable "Egroup" (single line text) from RITM table to Req table
I wrote Business Rule On after Insert and specified the catalog item in filter condition
(function() {
//get the gliderecord for the parent request
var req = new GlideRecord('sc_request');
if (req.get(current.request)) {
req.eGroup = current.variables.x_egroup;
gs.addInfoMessage("Hello World");
req.update();
}
})();
FYI : I created BR on scoped application and a new field egroup on sc_request(request) table as a scoped field.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2019 03:53 PM
Actually
I tried that on global application and it worked successfully with below script
BR async
(function executeRule(current, previous /*null when async*/) {
var request =current.request.getRefRecord();
request.x_egroup = current.variables.egroup;
request.update();
})(current, previous);
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2019 03:53 PM
Actually
I tried that on global application and it worked successfully with below script
BR async
(function executeRule(current, previous /*null when async*/) {
var request =current.request.getRefRecord();
request.x_egroup = current.variables.egroup;
request.update();
})(current, previous);
Thanks