- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 03:45 AM
Hi all,
i am having requirement to resend emails for approvals using ui action
i have a script i need suggestion
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 05:25 AM
Hi @shaik23
If your issue has been solved please mark my answer as Accepted Solution.
You cant see updated email in email logs because you might be seraching with the wrong query. please open sys_email.LIST and Target as sys_id of the approval record
Regards,
Piyush Sain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 04:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 04:10 AM
@shaik23 Looks like the glide query you are using to fetch the record is not returning any result. Could you please post the updated script here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 04:11 AM
@Sandeep Rajput That is the script i have
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 04:14 AM
var e = new GlideRecord("sys_email");
e.addQuery("type", "sent");
e.addQuery("target_table", current.getTableName());
e.addQuery("instance", current.sys_id);
e.orderByDesc("sys_created_on");
e.setLimit(1);
e.query();
Looks like this query is not returning any result. I recommend running this script as a background script by replacing current.getTableName() with table name and current.sys_id with the sys_id in consideration and check if the query returns anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 04:18 AM - edited 01-10-2024 04:23 AM
the target table is approval
