sc_task Additional Comments

nyrguy45
Kilo Contributor

Hello All,

I am having issues with "Additional Comments" not being emailed to the Requestor of the task from SC_task

I am new to ServiceNow so not sure as to where to begin looking.

Any help would be highly appreciated.

 

Best,

 

1 ACCEPTED SOLUTION

JR Guieb
Tera Expert

Here is what I did for my company because we had the same requirement.

 

First what I had to do is to create an email notification that will send to the requester whenever Additional Comments are entered into the RITM.

 

Next I created a business rule that will copy the Additional Comments from the catalog task and place them into the RITM. Here is what I did for the business rule:

  • Table = Catalog Task [sc_task]
  • Check Advanced
  • When to run
    • When = Before
    • Update = checked

find_real_file.png

  • Advanced
    • Condition
      • current.comments.changes()
    • var gr = new GlideRecord('sc_req_item');
      gr.get(current.request_item);
      gr.comments = current.comments;
      //gr.work_notes = current.work_notes;
      gr.update();

find_real_file.png

Now when an additional comment is added at the catalog task it will get copied into the RITM, and because there is an email notification setup to send to the requester when an additional comment is added to the RITM the email to the requester will send.  

View solution in original post

17 REPLIES 17

since it is a GlideRecord updating a different table add gr.update() after gr.comments = current.comments;

Like so 

(function executeRule(current, previous /*null when async*/) {

var user = new GlideRecord ('sys_user');
	user.addQuery('user_name', current.sys_updated_by);
	user.query();
	if (user.next()){
		if (user.sys_id != current.request.requested_for){
			var gr = new GlideRecord('sc_req_item');
			gr.get(current.request_item);
			gr.comments = current.comments;gr.update();
		}
	}

})(current, previous);

I would put gr.update() on a new line but it should work like that also.

Hello Brian,

I do appreciate all the information and help but unfortunately, it does not work I moved the gr.update(); to a new line and still does not push notes to the RITM.

Not sure what else to do.

I believe the below

if (user.sys_id == current.request.requested_for){

should be as follows:

if (user.sys_id == current.request_item.requested_for)

 

To make sure check the column names on the tables both (sc_task and sc_req_item)