Pop up automatically disappearing after Vancouver upgrade.

Raj Kini2
Tera Contributor

Hi,

We had a requirement to show "Time Worked" table(task_time_worked) form as a Pop up, when an External comment is added and the form is saved on the "Agent Workspace". This functionality was working before the instance was upgraded to Vancouver(Previous version was San Diego). PFB the screenshots of the Pop up.

RajKini2_0-1697613041795.png

The issue here is when the external comment is added and form is saved, the Pop is appearing but in few seconds it automatically disappears. Before in San Diego version it used to stay.

Below is the OnSubmit Client Script :

function onSubmit() {
//Type appropriate comment here, and begin script below
var sysID = g_form.getUniqueValue();
var userID = g_user.userID;
var data = '';
var thisView = g_form.getViewName();
var companyType = g_scratchpad.companyType;
var soldProduct = g_form.getValue('sold_product');
var workNotes = g_form.getValue('work_notes');
var externalNotes = g_form.getValue('comments');
var journalCancelResolve = g_form.getValue('u_journal_ext_resolution_notes');


if (thisView == 'workspace' && (workNotes != '' || externalNotes != '' || journalCancelResolve != '')) {

if (companyType == 'ict' && soldProduct != '') {

var userID = g_user.userID;

var caseID = g_form.getUniqueValue();

var url = '/task_time_worked.do?&sys_id=-1' +
'&sysparm_query=task=' + caseID +
'^user=' + userID +
'&sysparm_view=workspace' +
'&sysparm_view=workspace' +
'&sysparm_titleless=true' +
'&from_workspace=true';


g_modal.showFrame({
title: getMessage("Time Worked"),
url: url,
size: 'lg',
height: '20rem',

});


} else {

return false;
}


}

}


I have tried using the similar code in Save UI action. But there as well I got the same issue. I am not sure is this thing related or not. For me, it seems the issue here is with the form submitting part. I have noticed that Pop up appears even before the Case form is fully submitted. When the form is submitted completed the Pop up disappears. I tried onChange Client Script and it works but our client's requirement is not getting fulfilled with that. It seems, we need to stick with OnSubmit only.


Please help, is there any other way to achieve this functionality?

Thanks.

0 REPLIES 0