- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 10:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 10:41 AM
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 incident - or if you want this to all tasks you can choose 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.sys_class_name);
current.addQuery("instance", parent.sys_id);
})(current, parent);
6. Click Submit.
7. Go to your incident form, configure related lists, and add "Email Log" or whatever you called the relationship in step 2 above.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 10:51 AM
HI Victor,
You can add Emails to your list of fields that get displayed in the Activity Formatter by adding it as '*Email*' to the UI property in [sys_properties] for that particular type of task.
i.e., for Incidents:
Name: glide.ui.incident_activity.fields
Value (ex.): comments,assigned_to,assignment_group,u_category,priority,resolved_by,*Email*,urgency,short_description,state,work_notes
Or, if you actually want it as a separate related list, you can define one by going to System Definition>Relationships:
- Create a new relationship.
- Set Applies to table: Task [task]
- Set Queries from table: Email [sys_email]
- Enter the following script in Query with:
current.addQuery('instance=' + parent.sys_id);
Lastly, add this new related list to your form configuration for whatever kind of task you like.
Give either of those a try.
Thanks,
-Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-21-2022 10:15 AM
Hi,
For this same configuration https://community.servicenow.com/community?id=community_question&sys_id=165f72a9db58dbc01dcaf3231f961984
How to use it for the mobile application.
For example, consider the Cases,
This cases contains Emails in the related list tab( currently we have this functionality in Agent Workspace) how to implement the same functionality for Now agent mobile app. So that the app contains icon for cases and inside the cases we must have the email tab as related list.....
How to configure this using studio......how to implement the related list part...... currently Email is not showing under the related list (relationship), if we search there and destination screen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2016 11:17 AM
Thanks a bunch gents.....it worked like a charm.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2021 10:57 PM
Hello how can I configure email approval in related list? Will it also be in the System Definition > Relationships?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2024 08:35 AM
Hi , I am only able to see the sent messages. Is there any way to see the received emails as well ?