Use of notification email script to fetch variable

Geeta5
Giga Contributor

Hi Team,

I have  a requirement to trigger a notification.

The notification is created on 'Sysapproval_approver' table.

I have to send this notification to a email id which is present in the 'sc_req_item' form. Variable name in sc_req_item is : 'local_procurement'.

So my notification is getting fired based on condition, it is having the RITM number, how I can write email script to get the value of variable 'local_procurement' and pass this via email  script made calling  on sysapproval_approver table to trigger the notification to that email id(local_procurement).

Please suggest.

 

1 ACCEPTED SOLUTION

Hi Geeta,

in workflow you can use wait for timer activity for waiting and then sending email

You can include schedule as well for excluding weekends

If you are stuck inform the issue.

Please consider marking appropriate reply as Correct & 👍Helpful.

Regards
Ankur

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

View solution in original post

19 REPLIES 19

Thanks Ankur,

 

I triggered everything via workflow now. It worked. In workflow I used timer and then sent notification. To trigger the notification to a catalog variable(local_procurement) , I used script in notification activity in the workflow. it worked.

Just I have one issue, I also have to mark some people(like requested for line manager) in 'cc' in this notification which is used in workflow. How can that be achieved. Is there any script for the same.(I have to trigger notification from workflow only this is the only option I have).

Please suggest.

Geeta5
Giga Contributor

I have done the cc part as well.

Is local_procurement correct variable name? & for the item that you tested does it has any value for the variable?

 

Yes the variable name is correct and it does contain valid value(which is email id).

 

 

Community Alums
Not applicable

Hi Geeta, Can u post screenshots of your mail script, notification and the RITM variable so that we can cross check?