- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 09:36 AM
I have a requirement to copy Change Request from problem form to change request related list on same problem form. OOTB its not getting copied in related list. Appreciate quick response.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 10:45 AM
Hello @raju51
Use this -
(function executeRule(current, previous /*null when async*/ ) {
var chNum = current.rfc;
var chGR = new GlideRecord('change_request');
chGR.addQuery('sys_id', chNum);
chGR.query();
if (chGR.next()) {
chGR.parent = current.sys_id;
chGR.update();
}
})(current, previous);
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 11:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 02:43 AM
Hello @raju51
please use this -
(function executeRule(current, previous /*null when async*/ ) {
var chNum = current.rfc;
var chGR = new GlideRecord('change_request');
chGR.addQuery('sys_id', chNum);
chGR.query();
if (chGR.next()) {
chGR.parent = current.sys_id;
chGR.update();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 11:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 02:43 AM
Hello @raju51
please use this -
(function executeRule(current, previous /*null when async*/ ) {
var chNum = current.rfc;
var chGR = new GlideRecord('change_request');
chGR.addQuery('sys_id', chNum);
chGR.query();
if (chGR.next()) {
chGR.parent = current.sys_id;
chGR.update();
}
})(current, previous);