I'm getting "event is deprecated" in my Inbound Mail Action in global scope

thomaskennedy
Tera Guru

I'm creating an Inbound Mail Action in the global scope in Utah, and I want to stop further processing. The code editor is telling me event is deprecated:

 

 

event.state = "stop_processing";

 

 

I was doing this inbound action in a scoped application and it's working fine, but I came across a need to do it in the global scope instead, and this warning comes up. Is the syntax different in global?

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi,

Does that have any functional impact? If not, then yuo can ignore as it is more of warning. Also, check for article link from ServiceNow.

View solution in original post

3 REPLIES 3

Jaspal Singh
Mega Patron
Mega Patron

Hi,

Does that have any functional impact? If not, then yuo can ignore as it is more of warning. Also, check for article link from ServiceNow.

James Fricker
Tera Guru

If you have the SN Utils browser extension you can fix this issue. Just update the Monaco editor settings with the following {"showDeprecated": false}

chetanb
Tera Guru

There is nothing wrong with the code when it is in a Script Action or Email Notification scripts that are triggered by events, or other scripts that should have access to the event and therefor, there is no functional impact on script execution.

 

Regards,

CB