Email script returns undefined when i enabled application admin in scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 04:45 AM
Hi Everyone ,
I have a custom application and there is an email notification on approver table which gets the non task table field values into the notification . It always returns undefined.
This is the sample code.
Pleas help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 12:59 AM
Yes i am using it in email scripts.
var duration;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 01:03 AM
try this :
var leaveRequest = new GlideRecord('leave_request');
leaveRequest.query();
if(leaveRequest.get(current.document_id)) {
gs.info("*****Test the Info");
var duration = leaveRequest.getValue('duration');
gs.info("**Test Info Inside** " +leaveRequest.getValue('duration'));
}
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 01:12 AM - edited 12-21-2023 01:14 AM
It didn't work . It doesn't work if i enable app admin. It works fine if i don't enable app admin. I want this to work when app admin is enabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 01:15 AM
This is strange, check with HI support !
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....