Issue with UI Action on Workspace
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 12:05 AM
Hello All ,
I have an UI Action button which Generates Session Key from beyond this Works well on UI but not on SOW Workspace , I see in the script they used glide dialogue window but seems it is deprecated
I tired with Glide Model but it is not working can you please check and amend the changes
function onClick(g_form) {
generateERSServerSessionKey();
function generateERSServerSessionKey() {
var ga = new GlideAjax('x_bmgr_support_ent.BomgarRemoteSupport');
ga.addParam('sysparm_name', 'generateSessionKeyServerSide');
ga.addParam('sysparm_record_id', g_form.getUniqueValue());
ga.addParam('sysparm_table_type', 'task');
ga.getXML(handleERSServerSessionKeyCallback);
}
function handleERSServerSessionKeyCallback(response) {
var answerString = response.responseXML.documentElement.getAttribute("answer");
if (answerString === null) {
alert('Something went wrong while attempting to generate a session key.');
return;
} else if (answerString.startsWith('ERROR')) {
var error = answerString.substring(6);
alert('An error occurred: ' + error);
return;
}
var sessionKeyJson = JSON.parse(answerString);
openLanguagePopup(sessionKeyJson);
}
function openLanguagePopup(sessionKeyJson) {
var dialog = new GlideModal('bomgar_session_key');
dialog.setTitle("Remote Support Session Key");
dialog.setSize(620, 200);
dialog.setPreference("session_link", sessionKeyJson.keyUrl);
dialog.setPreference("session_key", sessionKeyJson.shortKey);
dialog.setPreference("record_id", g_form.getUniqueValue());
dialog.setPreference("subject", sessionKeyJson.mailSubject);
dialog.setPreference("body", sessionKeyJson.mailBody);
dialog.render();
}
}
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 08:28 PM
can you post a new question as this is an old thread and tag me there?
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 11:21 PM
@Ankur Bawiskar , here is the new thread - https://www.servicenow.com/community/virtual-agent-forum/ui-page-in-workspace/m-p/2948869#M8336