How to set incident Caller as sender (FROM) in notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 05:51 AM
Hi,
I have a requirement to set incident Caller as sender (FROM) in notification. One script i have written but it seems it's not working.
Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 05:57 AM - edited 05-20-2024 05:58 AM
this should work.
if (email.origemail == '[email_address]') {
var arrSubject = email.subject.split(' : '); //need to include the
var gr = new GlideRecord('sys_user');
gr.addQuery('user_name', arrSubject[1]);
gr.query();
if (gr.next()) {
current.caller_id = gr.sys_id
}
} else {
current.caller_id = gs.getUserID();
}
Please mark my answer correct and helpful if this works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 06:04 AM
Hi @jugantanayak ,
Are you trying to send notification on behalf of caller? If yes please follow the below link
I started answering community questions recently. Please mark my answer as helpful if it helps you in any way.