- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 11:05 PM
Hi Experts,
I have created a notification on "sc_req_item" table and this notification is triggerd by event and event is present in workflow.
In notification, i have used email script,and in email script i am trying to print RITM details using current.number, current.opened_at in template.print but unable to print because current.sys_id is not pointing to ritm record, what needs to be done, please help me its priority task for me.
Regards,
G
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 11:25 PM
Hi,
you should pass the current object as event and notification is on sc_req_item table
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 11:18 PM
Can you share the event script?
Which object reference you are passing in the event as 2nd parameter?
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 11:22 PM
Hi,
I assume your workflow is running on RITM table?
share how are you triggering the event from workflow? screenshot
you must be passing wrong object to eventQueue()
regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 11:23 PM
Hi ankur,
ya wf is on ritm table.
ya in event queue i am passing task object, how to get ritm details ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 11:25 PM
Hi,
you should pass the current object as event and notification is on sc_req_item table
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2022 11:23 PM
Hi
Could you please confirm if the sys_id that you are getting is of the required RITM?
if this is the case then use the below script:
var ritmGr = current.getRefRecord();
//Now try printing the details
gs.info(ritmGr.number);
Also, confirm that:
- Event Registry, Notification is on your sc_req_item table
- While triggering the event second parameter is your required GlideRecord Object
Please mark my answer as correct if this solves your issues!
If it helped you in any way then please mark helpful!
Thanks and regards,
Kartik