Business Rule - Add automatic comments as admin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 02:05 AM
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
Thanks & Regards,
Anna Silva

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 05:41 AM
Can you attach screenshots?
It shouldn't work on an after rule! Only before!
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 06:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 04:06 PM
Can you show your 'before' business rule?
If this is working for you anyway, please mark my answer as correct
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 11:39 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 11:55 PM
I can't really help further until I can see your 'before' business rule.
All you should need to do is substitute my line of code in with the business rule in your first post.
I just did this in a test environment (our admin account is called 'Kinetic IT')
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022