Impersonating a user added a comment but in email notification it is showing comment added by system

Amol Pawar
Tera Guru

Hi All,

I have created a notification when someone rejects a request. While rejecting he needs to add a comment. In the email notification, I have added in the email body as ${comments} and it's working fine but it's not showing the user's name in the activity log. It's showing as 'System'.

AmolPawar_0-1696340873335.png

Please help me to understand why this is happening and how can I get their user's name who added a comment?

 

Thanks in advance,

Amol

 

1 ACCEPTED SOLUTION

Amol Pawar
Tera Guru

Hi @Ankur Bawiskar and @Peter Bodelier ,

Thank you for your reply and efforts.

I created a flow to clear the custom comments field and copy its value to the Journal input field. So, in that flow, I have updated flow property and it worked.

AmolPawar_0-1696403309127.png

"Run as: User Who initiates the session". Now it's showing user name who add a comment in the request.

 

Thanks,

Amol

View solution in original post

4 REPLIES 4

Peter Bodelier
Giga Sage

Hi @Amol Pawar.,

 

Can you share how you are inserting the comment now?


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Ankur Bawiskar
Tera Patron
Tera Patron

@Amol Pawar 

is the request rejected via some scheduled job or flow?

what happens when someone actually rejects it and add comments? it must be showing correct user name there

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Amol Pawar
Tera Guru

Hi @Peter Bodelier and @Ankur Bawiskar ,

Thank you so much for your reply. I'll try to explain with the help of below screenshots:

I have created UI actions to reject the request in the portal view, where if comments are empty then it will show an error as comments are mandatory. They can approve the request only if they add something in the comments field.

AmolPawar_0-1696348875495.png

Then I have added a comment and saved the form. In the activity log it's showing System.

AmolPawar_1-1696349097151.png

Here one thing I wanted to mention is 'Comments' field is of 'full string' type which I have to create since first there was a comment field in the form of 'Journal Input' type. But when I added an 'Activity Log' in the form because that was a requirement, that comment field(journal input) was not visible at the top. It was visible in the activity log itself.

AmolPawar_2-1696349344955.png

If I add a comment in 'Activity Log' itself, then it shows the correct user name instead of 'System'.

Then why the same not happening for my custom 'Comments' field of 'full string' type?

 

Thanks,

Amol

 

Amol Pawar
Tera Guru

Hi @Ankur Bawiskar and @Peter Bodelier ,

Thank you for your reply and efforts.

I created a flow to clear the custom comments field and copy its value to the Journal input field. So, in that flow, I have updated flow property and it worked.

AmolPawar_0-1696403309127.png

"Run as: User Who initiates the session". Now it's showing user name who add a comment in the request.

 

Thanks,

Amol