- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 07:41 AM
I'm trying to pass an event to an email notification, but it is empty. Can anyone help me solve this?
I have a script include with the following code:
var table = gs.getProperty('searchtables')
var checkFields = new GlideRecord(table);
checkFields.query();
gs.eventQueue('no_tables', '', checkFields.getClassDisplayValue());
I've checked that "checkFields.getClassDisplayValue()" has a value, which it has.
Then I've a Email Script as follows:
var string = event.parm1;
email.setSubject('Table ' + string + ' failed');
template.print(string);
But event.parm1 is then empty. I get the email but without the value from parm1
Does anyone know why?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 01:47 AM
Got it to work, added gs.getUserID();
gs.eventQueue('x_225566_gdpr.no_tables', '', gs.getUserID(), checkFields.getClassDisplayValue());
My notification has no table, that's why I wanted to have an empty string... Will try with null as well if that's best practice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 01:47 AM
Got it to work, added gs.getUserID();
gs.eventQueue('x_225566_gdpr.no_tables', '', gs.getUserID(), checkFields.getClassDisplayValue());
My notification has no table, that's why I wanted to have an empty string... Will try with null as well if that's best practice