Event is empty when sending a notification

Jonatan4
Giga Guru

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?

 

1 ACCEPTED SOLUTION

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

View solution in original post

5 REPLIES 5

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