- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
Why might a Notification variable like ${caller_id.manager.name} show blank? I tried multiple ways but it is not working. Kindly help.
Regards
Suman P.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ServiceNow Use6 ,
also you can try this using the email script and call email script in notification
1)create notification email script .( enter name and paste this code);
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var mgrName = "";
if (current.caller_id.manager) {
mgrName = current.caller_id.manager.getDisplayValue();
}
template.print(mgrName);
})(current, template, email, email_action, event);
2) call that notification email script in you notification.
${mail_script:your_notification_email_script_name}
Output
user form
If my response/article helped you, please mark it as the correct answer and close the thread — this helps other readers in the community.
Regards,
Tejas
🚀 ServiceNow Developer | 🏆 HackaNow Finalist | 💡 Community Contributor
📧 Email: tejas.adhalrao11@gmail.com
🔗 LinkedIn: linkedin.com/in/tejas1018
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ServiceNow Use6
Check if the 'Caller' has a Manager value. If it exists, the it should show in the email.
Also, ensure that your Notification record is being created on the correct table.
As per OOB, caller_id field belongs to the Incident table. So, your notifictaion record should be created on the incident table.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ServiceNow Use6 ,
also you can try this using the email script and call email script in notification
1)create notification email script .( enter name and paste this code);
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var mgrName = "";
if (current.caller_id.manager) {
mgrName = current.caller_id.manager.getDisplayValue();
}
template.print(mgrName);
})(current, template, email, email_action, event);
2) call that notification email script in you notification.
${mail_script:your_notification_email_script_name}
Output
user form
If my response/article helped you, please mark it as the correct answer and close the thread — this helps other readers in the community.
Regards,
Tejas
🚀 ServiceNow Developer | 🏆 HackaNow Finalist | 💡 Community Contributor
📧 Email: tejas.adhalrao11@gmail.com
🔗 LinkedIn: linkedin.com/in/tejas1018
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hi @ServiceNow Use6 ,
Go to the record whichever table you are using and check below data is there are not .
- caller_id is populated.
- caller_id.manager is populated.
- caller_id.manager.name is not empty.
Fix -Ensure the caller_id user has a manager assigned in their user profile (sys_user table).
If the notification is triggered before the record is fully saved, the manager field might not be available yet.
Fix- Use "After Insert" or "After Update" as the notification condition to ensure all related fields are populated.
NOTE - please check if ACLs on the sys_user table and ensure the notification has access to caller_id.manager.name.
and test in business rule or script like below mentioned script -
Please make it correct and close the thread if this is working.
Thanks,
Rithika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Did you check the table on which email notification is created is correct one and dot-walked fields are available in the target table ?
If yes, check if the Caller ID has Manager field set and you are able to retrieve the details.
Do a simple test from Script Background like below
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan