Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create notification on User table with Audit History field names

TerryC03
Tera Guru

Hello,

 

Is it possible to create a notification for the sys_user table when a record is updated, showing what has been updated via the sys_history_line table? For example,

TerryC03_0-1705080104955.png

I'm thinking about creating an email script. Would this approach work instead?

1 REPLY 1

Community Alums
Not applicable

You can use business rule like this on sys_user table and utilize standard notifications. Your script wont do much good - to anwer your question.

   var elements = current.getElements();
   var hasChanged = false;
   for(var i=0; i < elements.length;i++){
     var element = elements[i];
     hasChanged = hasChanged || element.changes();
     gs.info(element.getName() + ":" + element.changes());
   
   gs.info(hasChanged);