- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 03:11 PM
Hi all,
Newbie ServiceNow admin here :). I hope someone can tell me how this can be done... Recently I received a request to improve what IT staff see in Activities in relation to email notifications when working on Tasks. Currently, when an additional comment is added to an Incident, "System" adds a copy of the email to "Activity", see screenshot below. Our ITIL users have grown accustomed to seeing that on incidents and they like it since it assures them that an email was sent to the customer after the comment was added...
Now they would like to see the same thing for "Activity" area on the "Requested Item Notes" tab we have on Tasks. See screenshot below. You can see a "Test" comment was added but there is no "log" from "System" added showing a copy of the email send to the customer. What IT staff want to see if the comment and then a log from "System" showing a copy of the email notification - like what is currently setup with incidents. I have verified in the system logs that email notifications are indeed sent out, the need is for the "log" or copy of the email notification to show on the Requested Items Notes....
Since our instance is pretty close to OOTB I assume this is the default way things are set up. If someone could tell me how I would have the "system" log of the email notification after an additional comment is added to Requested Item Notes I would greatly appreciate it!
Thanks in advance!
-Chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 01:54 AM
If you want to use a related list for showing email please follow this -
The sys_email table uses a Document ID field(s) to relate back to records, not a direct relationship. So you will need to create a user defined related list:
Creating Defined Related Lists - ServiceNow Wiki
1. Go to System Definition\Relationships and click New
2. Name what you want to call this related list in the Name field- example "Email Log"
3. In applies to table choose Catalog Task
4. In queries from table choose Email
5. In the query with script field, paste in:
(function refineQuery(current, parent) {
current.addQuery("target_table", parent.request_item.sys_class_name);
current.addQuery("instance", parent.request_item.sys_id);
})(current, parent);
6. Click Submit.
7. Go to your Catalog Task form, configure related lists, and add "Email Log" or whatever you called the relationship in step 2 above.
If this has answered your question please Mark Answer/Helpful.
Thanks
Sonali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 07:10 AM
Check the below script and see if it can be applicable in your case.
Mark Answer / Helpful if this has answered your question.
Thanks
Sonali