Transaction Id

raprohaska
Kilo Guru

Hello all,


I'm betting something already exists and I'm just not searching the correct text. I want every server request to generate a unique id that can be used in logging, that way we can show a standard error when there are processing issues to the user, which includes this generated transaction id. Then the admins can utilize that id to find logging related to the particular transaction.

My first thought was to use a global business rule that would set a session value that can be utilized in our standard logging script. But it seems that global business rules cannot be created anymore as I get an error stating that all code must exist in a function even though the code was all encapsulated in a function. It would only save once I picked a table value other than global.

Thanks for any ideas or suggestions you can give.

5 REPLIES 5

Chandra30
ServiceNow Employee
ServiceNow Employee

Can we use GlideSession.getSessionID() as unique identifier for the transaction???