How were the target table column in the email logs populated for outbound emails?

Rain Vaine
Kilo Sage

Hello,
Do any of you have any idea on how is the target table field populated in the email logs? I found that it was populated for inbound email after it is processed but how about for outbound emails?

RainVaine_0-1705625630549.png

I just called that notification through an event that is triggered by a script.
Did it set the sys_user as the target table because it is inside that gliderecord query block?

RainVaine_1-1705625772774.png

 

Regards,
Vaine

 

4 REPLIES 4

Santhosh Dubbak
Tera Contributor

@Rain Vaine 

Is the event registry (sysevent_register) record "check scheduled report email address" created for sys_user table?

 

Sandeep132
Kilo Sage

Hi @Rain Vaine 

 

Check how the Event was registered in Event Registry table. There will be an option to select the table name which acts on the event. 

 

Also, you can check the Event log for the transaction to see which Database table acted on for the event. You can find more information here https://docs.servicenow.com/bundle/vancouver-platform-administration/page/administer/platform-events... . I think this is how Table Name is set for Outbound Emails.

Hope this helps.

Thanks,
Sandeep

hello,
I did not set any table for the event registration, same with the notification that is why I don't know what set the value for the target table. By the way do you know the significance of the value set in the target table?

RainVaine_0-1705627753048.png


Thanks and Regards,
Vaine

Narsing1
Mega Sage

Have you tried by binding to the scope as when you use forEach, the inside script can't recognize functions/variables declared outside/OOTB.  Try something like this

emails.forEach(function(emailAdd) {
//your code here
}.bind(this));

 

Thanks,

Narsing