- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 12:14 AM
I want to get the date on which the notification is sent and auto populate the same notification sent date in one of the custom field on the form.
I have tried this with Business rule but it doesn't work.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 02:42 AM
Instead of document_id, shouldn't you be using instance field.
Change first line of code:
var ref = current.getValue("instance");
Feel free to mark apt response as Helpful and Correct so thread can be close, and makes it easier for others to spot the answer looking for similar issue.
Help make community better!
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 12:26 AM
Hi @Pratiksha Lang1 ,
you would require business rule on email logs[sys_email] table and then pick the time when the type changes to sent and populate the updated time in incident record field.
Condition should be such that it only works for incident table
BR: On sys_email
After Update:
Condition: Target table is incident AND Type is sent
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var inc = current.document_id;
var gr = new GlideRecord('incident');
gr.get(inc);
gr.<field> = current.sys_updated_on; // give here the custom date time field
gr.update();
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 02:25 AM
I have already done the same thing @Community Alums

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 02:42 AM
Instead of document_id, shouldn't you be using instance field.
Change first line of code:
var ref = current.getValue("instance");
Feel free to mark apt response as Helpful and Correct so thread can be close, and makes it easier for others to spot the answer looking for similar issue.
Help make community better!
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 02:52 AM
Thank You So Much for your help, this works @Aman Kumar S