Skip to content

Commit 735ed1d

Browse files
authored
Create synccommentfromritmtotask.js
1 parent 184b1af commit 735ed1d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
(function executeRule(current, previous /*null when async*/ ) {
2+
3+
var ritmLink = '[code]<a href="nav_to.do?uri=' + current.getLink() + '" target="_blank">' + current.number.toString() + '</a>[/code]';
4+
5+
var scTask = new GlideRecord('sc_task');
6+
scTask.addQuery('request_item', current.sys_id);
7+
scTask.addActiveQuery();
8+
scTask.query();
9+
while (scTask.next()) {
10+
scTask.comments = 'Updated comments on: ' + ritmLink + '\n' + current.comments.getJournalEntry(1);
11+
scTask.update();
12+
}
13+
14+
})(current, previous);

0 commit comments

Comments
 (0)