The CreatorCon Call for Content is officially open! Get started here.

Why might a Notification variable like ${caller_id.manager.name} show blank?

ServiceNow Use6
Tera Guru
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.

 

1 ACCEPTED SOLUTION

TejasLogicX_11
Mega Contributor

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}

 

 

 

TejasLogicX_11_0-1758181384406.pngTejasLogicX_11_1-1758181488868.png

Output

TejasLogicX_11_2-1758181750292.png

 

user form 

 

TejasLogicX_11_3-1758181800761.png

 

 

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

View solution in original post

6 REPLIES 6

@ServiceNow Use6 

 

Did you get a chance to review this as I believe the provided information should answer your question.

 

As per community guidelines, you can accept more than one answer as accepted solution. If my response helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

Ankur Bawiskar
Tera Patron
Tera Patron

@ServiceNow Use6 

Notification is on which table?

that table has correct caller_id field and that caller has manager populated and that manager has name field populated?

Are you checking with admin or non-admin?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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