Business Rule to trigger event

Julia Howells
Giga Guru

Hello SN Community, 

I am trying to trigger an event based off the conditions that the case is closed and the additional comments changes. Currently, it doesn't look like the event is firing at all with my current parameters. I think I am calling it correctly, but I must not be doing something right. Thanks! 

find_real_file.png

(function executeRule(current, previous /*null when async*/) {
gs.eventQueue ("sn_customerservice.case_closed_email", current, gs.getUserID(), gs.getUserName());
})(current, previous);
2 REPLIES 2

Vikram Reddy
Giga Guru

Hello,

Firstly set a gs.info() statement to check if your BR is triggerring with current condiitons and then

Convert parameters into Strings in the event trigger

gs.eventQueue ("sn_customerservice.case_closed_email", current, gs.getUserID().toString(), gs.getUserName().toString()); 

 

Thank you,

Vikram

Harish KM
Kilo Patron
Kilo Patron

Hi is your record setting active to false?Once you close the case? also i think there is a space after eventQueue method can you check and remove the spaces?

gs.eventQueue ("sn_customerservice.case_closed_email", current, gs.getUserID(), gs.getUserName());

to

gs.eventQueue("sn_customerservice.case_closed_email", current, gs.getUserID(), gs.getUserName());

Regards
Harish