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

you can use the following line in the email template to set the subject of the email



email.setSubject(subject line needed)


Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Aninyda,



The main issue there is that you can only pass strings as parameters, so passing an object and expecting to acess it as an object won't work. Both the solutions presented will work, but if you really want to go the route of passing an object as the second parameter, you can encode it as json and then decode it in a mail script. Probably overkill for your case, but it can be helpful.



Re: What is the proper way to serialize / deserialize objects?