I have to enable email preview on workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2025 07:45 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2025 08:10 PM
@jennv Right. You can replace & add g_modal.open({...}), which is workspace friendly model API.
try this code & test.
(function previewEmail() {
// only run in the Workspace client
if (typeof g_modal !== 'undefined') {
g_modal.open({
title: 'Email Preview',
// name of your UI Page or widget that renders the email body
widget: 'email_preview',
widgetInput: {
sysparm_sys_id: current.sys_id
}
});
} else {
// fallback if someone somehow hits this in classic UI
var gm = new GlideModal('email_preview');
gm.setTitle('Email Preview');
gm.setSize('large');
gm.addParam('sysparm_sys_id', current.sys_id);
gm.render();
}
})();
- widget should match your UI Page name (email_preview) or a Service Portal widget if you’re using one and widgetInput passes parameters into that page (your sysparm_sys_id).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2025 12:31 AM
Thank you!!