将批准者评论复制到请求的项目

Copy Approver Comments to Requested Item

目前,当评论字段发生变化时,我在批准 table 到 运行 上设置了业务规则。我需要将批准人评论中的评论复制到请求的项目。我是 ServiceNow 的新手,所以我还在学习这个平台。

这对我有用:

(function executeRule(current, previous) {

  var gr = new GlideRecord('sc_req_item');
  gr.get(current.sysapproval);
  gr.comments = current.comments.toString();
  gr.update();

})(current, previous);