Worknotes created by

Valentin Olha
Tera Contributor

Hello community, the activity entries in RITMs or REQs have the "opened by" as creator of an activity notes. I would expect that "system" would be mentioned. 

 

Is there solution for this?

system.png

Thanks.

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@Valentin Olha  If entries in the activity formatter are triggered by opened for then only their name would appear in the formatter. 

Rajesh Chopade1
Mega Sage

hi @Valentin Olha 

In ServiceNow, by default, the "Opened By" field in activity entries (such as comments, work notes, and approvals) is set to the user who triggers the event, even if it's an automated process. This is why the "Opened By" field shows the actual user who initiated the request or made the change, rather than "System."

If you want the "Opened By" field in RITMs or REQs to show "System" when system actions (e.g., automated flows or scheduled jobs) are responsible for the activity entries, you can customize this behavior.

In Flow Designer, you can set the Run As property to "System" by default. This ensures that any action taken in the flow appears as if it was done by "System" instead of the user who initiated the flow.

 

I hope my answer helps you to resolve your issue.

thank you

rajesh

Hi @Rajesh Chopade1 , thanks for answer. Well flow is set to "Run as System User" and its still happening. Maybe any other idea? 🙂

ValentinOlha_0-1725951259014.png

 

Hi 

1) Use a Script Action in the Flow to Override the User:

Add a Script Action step in your flow at the point where updates are made to the record.

Insert the following script to change the opened_by field to "system":

 

current.opened_by = gs.getUserID('system');

current.update();

 

This will ensure that any changes in the flow will log the system user as the one making the update in the activity logs.

 

2) Alternatively, you can create or modify a Business Rule to automatically set the opened_by or updated_by field to "system" whenever the flow makes changes.

 

Create a Business Rule on the RITM or REQ table.

Set it to run before insert/update.

Use the following script to set the user to system:

 

if (current.source == 'flow' && !gs.isInteractive()) {

    current.opened_by = gs.getUserID('system');
}