@sirou You dont need to do GlideRecord on email table.

 

email object itself is gliderecord object.

 

var s = email.subject.toString();

 

The above line should give you subject. dont query email table

 

Replace line 3,4,5,6,7 with above line

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

View solution in original post