Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Fire an event

AbidJafrey
Tera Contributor

Hi I have a  requirement to send a notification if the item changes to closed complete and a variable condition is met.

 

I have written this

 

(function executeRule(current, previous /*null when async*/ ) {

    // Add your code here

    var a = 'Afstemning@dsb.dk';
    gs.eventQueue('hr.Byttepenge.jeg.har.miset.mine', current,a);

})(current, previous);
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@AbidJafrey 

why not directly send it from notification filter condition?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Thanks Ankur, im able to achieve this,

 

Another question, is there any way to add the variable value in the mail

@AbidJafrey 

yes you can add the variables using this syntax if it's for RITM

${variables.variableName}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Not applicable

yes, the syntax is 

${variables.VARIABLE_NAME}