The CreatorCon Call for Content is officially open! Get started here.

Why is the event not firing?

honamiUeo
Tera Contributor

■assumption

・What we want to do is send an email to the users checked in the user table

・Email property settings.

honamiUeo_0-1694677348829.png

 

 

・I wrote this code in the script include

(In fact, we will store the address obtained from the ui action)

(I put sys_id Third argument and it didn't work.)

gs.eventQueue('sendEmail', current, 'sample@aaa.co.jp', 'firstname lastname');
 
・event registration
 
honamiUeo_1-1694677566447.png

 

・notification

 honamiUeo_2-1694677610519.png

 

・Checked.

Event parm 1 contains recipient
 
 
Can someone please help me?
 
1 ACCEPTED SOLUTION

DYCM
Mega Sage

Hello @honamiUeo ,

I think the issue is from the parameter1.png2.png

sysparam_checked in UI Action

sysparm_checked in Script Include

View solution in original post

23 REPLIES 23

Also check if you are getting the user records passed to the SI or not. May be check the output of this variable 

gs.info("Entered here "+record_list.length);

If you did not get the records in SI, then in your UI action, convert to string  and try again.

g_list.getChecked().toString()

@asifnoor 

Thank you for teaching me so much.

I inserted the gs.info where you instructed, but it does not show up in the App log.

honamiUeo_0-1694690074605.png

 

However, the event log shows that the event itself was executed.

honamiUeo_1-1694690239846.png

 

Hi,

As you can see one event got processe and other did not. And that could be because, you are

using <= in the for loop.

 

Change the for loop like this

for(i=0;i<record_list.length;i++) {

 

Mark the comment as a correct answer and other comments as helpful if it has solved the problem.

@asifnoor 

Thank you.

The error in the event log has been resolved.
The main issue, the cause of the event not firing, was my own typo.
Thank you very much for your help.
I look forward to working with you again when the opportunity arises.