Business Rule - Add automatic comments as admin

SNOW User8
Giga Guru

Hi All,

Want to add automatic comments in an incident additional comments field when new incident is inserted.

My issue is, added comments are updated by the current user, But I want it as Admin. Since it is an automatic comments.

How to do that ?

If anyone know the solution kindly, help me.

Business Rule:

Before insert,

Script:

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

// Add your code here

current.comments = "Thank you for contacting TEST";

})(current, previous);

The comments here added by the current user, I want it as System Administrator

find_real_file.png

Thanks & Regards,

Anna Silva

24 REPLIES 24

Hi Paul,

 

As a workaround, we just created a workflow and added 1 second delay so that it will appear that System added the comment both on the portal and email notification.

gavinc
Giga Contributor

Using the new Flow Designer in Kingston, then you can add comments to incident by "system" user. It last update of incident is also by "system" and it display correct commented users "system" in notification email.

Will check out the Flow Designer once we upgrade to Kingston. Thanks for the information 🙂

istvanwellmann
Tera Contributor

Create a script action on the incident table, triggered by the incident.inserted event. In the script action, you can append the comment, and this will be performed by the system account.


Dave Smith1
ServiceNow Employee
ServiceNow Employee

My issue is, added comments are updated by the current user, But I want it as Admin. Since it is an automatic comments.


Is there a reason behind that?   You're kinda breaking an audit trail by reporting incorrect information.



I can understand "system" for automated injection, but not "admin" - that's a false attribution.