Autoexpand "Show email details" in email log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 06:09 AM
Is there a new way we can auto-expand the Show Email Details section inside the activity log so the agents don't have to click it?
There are a few old posts from 4-7 years ago with the same question where the solution was adding ($$("img[onclick*='ActivityFilter.activityEmailToggle']")).each(function(item){item.click()}); to a client script. I don't know if anything has changed since then but this is not working for us.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 06:17 AM
Hello,
You may have to do with DOM manipulation which is not recommended by Servicenow hence nothing can be done here.
Please hit like and mark my response as correct if that helps
Regards
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 06:22 AM
Hi
Try using the below code in the onLoad script-
($$("a[onclick*='ActivityFilter.activityEmailToggle']")).each(function(item){item.click();});
Please mark my answer as correct or helpful, if applicable.
Thanks,
Aishwarya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2022 06:10 AM
Hello,
If you are fine with my response, Please hit like and mark my response as correct if that helps.
Regards
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2022 07:09 AM
The Activity Stream loads after onLoad scripts so you need to watch for when it's loaded before clicking:
angular.element('.sn-form-stream-inline').scope().$watch('loaded', function() {
jQuery('a[action-type="show-email"]').click();
});