Event Parameter

anindya_11
Giga Contributor

Hi ,

I have created an event and am triggering it via   a business rule.

like the one below

 

var grTask = new GlideRecord('rm_task');

grTask.addQuery('parent.parent',current.sys_id);

grTask.query();

while(grTask.next()){

gs.eventQueue("cs.rm.task.assignment.group", current, gs.getUser(), grTask);

}

 

But in the body of the email notifications   I'm unable to use values by a dot walking like

${event.parm2.number} and etc.

 

Any idea why and how may I overcome this or anyone has a workaround ???

 

Thanks in advance

6 REPLIES 6

Kalaiarasan Pus
Giga Sage

pass the sys_id as second parm and do a basic gliderecord and get the fields required......


Hi kalai,

 

I am currently working on similar scenario.

I have passed the sys_id and able to access glide record ,log the required value.But am not able to use the value/variable in template.print() function

I tried to use as ${var_name},but didn't work.I am getting blank in mail.  

I need to print that value table.

can you please suggest me how is it possible or where am i going wrong?

 

Thanks 

swathi

anindya_11
Giga Contributor

That option was there: but my situation demands that the event trigger script & notification   be on different tables.


So a glide record is not helping me get the ${event.parm2.number} as a part of the subject of the mail


Harish Murikina
Tera Guru

Hi Aninyad,



                    Write below code it can works.





Hi ,


I have created an event and am triggering it via   a business rule.


like the one below



var grTask = new GlideRecord('rm_task');


grTask.addQuery('parent.parent',current.sys_id);


grTask.query();


while(grTask.next()){


gs.eventQueue("cs.rm.task.assignment.group", grTask , gs.getUser(), grTask); // Here instead of current you can pass glideobject


}



And at the body of the email u can directly access. like below screenshot.File.JPG



number : ${number}


name : ${name}




Regards,
Harish.