Notification Email Script getCompanyID return null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2022 10:16 PM
Hi All,
I have built notification email script
var GU_obj=gs.getUser();
var compid=GU_obj.getCompanyID();
template.print(compid);
I have tested this on "Scripts - BackGround",It returned the value as well.
I have called the script from email Notification body,When user received the email ,They received the value as null.
thnx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 12:24 AM
Hi Pratap,
Can you confirm user have Company ID or Company Name and Are you using global or scoped applications
Thanks
Chandu Telu
Please Mark ✅ Correct/helpful, if applicable,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 01:29 AM
I have tested with my user and with two user profile ,all they have company set on their sys_user form. It not a data issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 12:25 AM
Hi Pratap,
How are you triggering this notifications?
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 01:28 AM
I have configured notification and using ${mail_script}
I have ${mail_script:Incident_Update_N}
I have built notification script with name "Incident_Update_N"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2022 01:35 AM
Did you check my above comment?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader