- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 01:29 PM
We are trying to create a Send Email custom UI Action on one of our Service Portal page similar Send Email from the backend on any of the form/ticket. We are also looking for ability to preview the email before clicking Submit. So, was looking if anyone here has any recommendation or suggestions for the same, as I wasn't able to find anything on the community.
Looking for the response.
Thanks,
Ashwath
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 10:54 PM
Hi Ashwath,
The email preview functionality uses the following URL in the background to generate the email preview:
https://<your-instance-name>.service-now.com/notification_preview_html_body.do?sysparm_record_id=<record_sys_id>&sysparm_user_id=<logged_in_user_id>&sysparm_event_id=&sysparm_notification_id=<notification_sys_id>
where record_sys_id is the sys_id of the record for which you want to preview the notification,
logged_in_user_id is the sys_id of the logged in user,
notification_sys_id is the sys_id of the notification record that you have configured for that record
You can use that URL, as a link in a widget which opens the preview in a new tab. Or you can try to create iFrame inside your widget, to show that page which renders the notification.
Here's an article I had written to have a UI Action on any table record (not on a service portal though) to preview notification before sending it. It uses UI page as a solution, you can try to convert the logic to a widget.
Hope this helps!
Cheers,
Manish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 02:50 PM
Hi,
If you are refering to the compose email UI\popup?
Perhaps you can just invoke the existing email client from the service portal either as a popup or as a iframe
Looking at the way the email_client (popup) URL is formed, I don't think it would be diffuclt to recreate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 04:14 PM
Thanks for the suggestion. But, is there a way that I can preview before sending, as the email client doesn't have the option to.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 10:54 PM
Hi Ashwath,
The email preview functionality uses the following URL in the background to generate the email preview:
https://<your-instance-name>.service-now.com/notification_preview_html_body.do?sysparm_record_id=<record_sys_id>&sysparm_user_id=<logged_in_user_id>&sysparm_event_id=&sysparm_notification_id=<notification_sys_id>
where record_sys_id is the sys_id of the record for which you want to preview the notification,
logged_in_user_id is the sys_id of the logged in user,
notification_sys_id is the sys_id of the notification record that you have configured for that record
You can use that URL, as a link in a widget which opens the preview in a new tab. Or you can try to create iFrame inside your widget, to show that page which renders the notification.
Here's an article I had written to have a UI Action on any table record (not on a service portal though) to preview notification before sending it. It uses UI page as a solution, you can try to convert the logic to a widget.
Hope this helps!
Cheers,
Manish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2019 10:05 AM
wow, Thanks a lot Manish. I will take a look at this and will give a try.
Thanks,
Ashwath