Can you identify the source of the event record?

bonsai
Mega Sage

I'm looking for a way to find out which record created in the event log [sysevent] was issued by which source.

In many cases, I think that events are issued by server-side scripts such as script includes, but I also think that there are events issued from flows and workflows.

I would like to identify the source that issued the event.

1 ACCEPTED SOLUTION

Omkar Mone
Mega Sage

Hello 

 

Identifying the source that issued an event in the [sysevent] table requires some investigative steps, as ServiceNow does not natively store detailed source information for events.

 

You can use Parm1 and Parm2 to create an identifier when the event is triggered. 

 

for ex-

gs.eventQueue('custom_event_name', current, 'ScriptInclude:XYZ', 'Any other details');

 

For Server side scripts search with gs.eventQueue or gs.eventQueueScheduled in the code.

using the Script include table example - 

Go to Scripts - Includes and do a script search for Script contains gs.eventQueue or gs.eventQueueScheduled

 

Hope this helps.

 

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@bonsai 

it might be easy sometimes to search but it most of the times it would be difficult to track

events are triggered via workflows, flows, script include, business rule any server side script etc

Which particular event you are looking for?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@bonsai 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

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

@bonsai 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

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

Omkar Mone
Mega Sage

Hello 

 

Identifying the source that issued an event in the [sysevent] table requires some investigative steps, as ServiceNow does not natively store detailed source information for events.

 

You can use Parm1 and Parm2 to create an identifier when the event is triggered. 

 

for ex-

gs.eventQueue('custom_event_name', current, 'ScriptInclude:XYZ', 'Any other details');

 

For Server side scripts search with gs.eventQueue or gs.eventQueueScheduled in the code.

using the Script include table example - 

Go to Scripts - Includes and do a script search for Script contains gs.eventQueue or gs.eventQueueScheduled

 

Hope this helps.