Work notes registered as guest

Carlos52
Tera Expert

Hi everyone,

 

When a user makes a change in a ticket on my ServiceNow instance, and the caller of that ticket is "Guest", the work notes created automatically are registered as if the "Guest" user performed those changes:find_real_file.png

 

Can you help me understand what Business Role or other Script is writing these notes, so that I can fix this bug? I've checked most active Business Rules and used the "Debug Business Rule" however I can't seem to find the answer there.

 

Thanks in advance for any help.

4 REPLIES 4

Tony Chatfield1
Kilo Patron

Hi, without visibility of your instance and customizations that have been made to it, it is not possible for the forum to identify your issue. Does it happen only for the work_notes field, or multiple fields if you update them at the same time? and for 1 specific task type IE Incident, or for all task types?
Do you get the same result if you update the impacted field(s) from a list view?
I would start by searching the script field of BR's running on your target table (if table specific) or task table for 'work_notes', although this could also be the result of work-flow\flow or (less likely) a script action or client script. 

You should be able to open Studio and use the code search function to identify any code that references 'work_notes', you could also try searching for 'guest' and\or the sys_id of the 'guest' user record. 

Search within application files (servicenow.com)

Hi Tony,

 

Thanks for the help. I guessed it would be probably impossible for you to give me an exact answer without having access to my instance, but your search suggestions still helped (I had already searched the Business Rules, with no success).

 

The only BR that I've found that might be responsible for the notes is the following one:

if (current.mandatory_fields || current.not_mandatory || current.read_only_fields || current.not_read_only || current.visible_fields || current.not_visible) {
	if (!current.work_notes_rule)
		new StateFlow().createWorkNotesRule(current);
} else {
	if (current.change_client_script) {
		new StateFlow().checkDeleteChangeClientScript(current);
		current.change_client_script = "";
	}
	if (current.work_notes_rule && current.work_notes.nil()) {
		new StateFlow().checkDeleteWorkNotesRule(current);
		current.work_notes_rule = "";
	}
}

find_real_file.png

 

Can you help me figure out what's happening here? I've accessed workflows and state flows, but I cannot find the StateFlow mentioned on the script. Or am I looking in the wrong place?

 

Cheers.

Hi, that BR relates to state flow and I don't see it as relevant to your issue.
Is the behaviour the same if you update the impacted field from a list view? if the 'guest' update only occurs from a form update then it may be a client script.
Is the behaviour the same for all task types IE Incident, change_request, problem, request?

 

Pratik Malviya
Tera Guru
Hi, There would be a customised business rule or flow which updates work notes. Search in Business Rule as Script contains current.work_notes. If this helpful to you, please mark helpful
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Thanks,
Pratik Malviya