File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
Server-Side Components/Business Rules/User Impersonation Activity Logger Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -30,19 +30,9 @@ The User Impersonation Activity Logger provides the following capabilities:
3030// Table: incident
3131// Script:
3232(function executeRule (current , previous /* null when async*/ ) {
33- if (new GlideImpersonate ().isImpersonating ()) { // Check if the user is impersonating
34- if (current .comments .changes () || current .work_notes .changes ()) { // Check if comments or work notes have changed
35- let actualUserName = gs .getImpersonatingUserDisplayName ();
36- let impersonatedUserName = gs .getUserDisplayName ();
37- let logMessage = ` User Impersonation Activity Detected:
38- Timestamp : ${ new GlideDateTime ()}
39- Actual User: ${ actualUserName}
40- Impersonated User: ${ impersonatedUserName}
41- Comments added: ${ current .comments || ' NA' }
42- Work Notes added: ${ current .work_notes || ' NA' } ` ;
43- gs .info (logMessage);
44- }
45- }
33+
34+ // Add the logic here
35+
4636})(current, previous);
4737```
4838
You can’t perform that action at this time.
0 commit comments