"Copy Change" should open in the same tab while copying new change in Workspace?

Virendra K
Kilo Sage

Requirement is, In Workspace , there is  "Copy Change" UI action button created to copy the change. Functionality is working as expected but the concern is...while copying, change should open in the same tab, not in sub tab.

 

Note: Its opening for native in the same window/tab. Expecting the same in Workspace.

 

How we could open copied /new change in the same tab? please help me.

 

Code written in UI Action for Workspace,

 

function onClick(g_form) {
    var srcSysId = g_form.getUniqueValue();
    var ga = new GlideAjax('CustChgUtils');
    ga.addParam('sysparm_name', 'getChgDetails');
    ga.addParam('sysparm_src_sysid', srcSysId);
    ga.getXMLAnswer(function(answer) {
        g_aw.openRecord("change_request", answer + "");
        g_form.addInfoMessage("Copying the Change Request");
       
    });
 
Regards,
Virendra
3 REPLIES 3

Kieran Anson
Kilo Patron

By the same tab, do you mean you want to replace the record that the UI action has been called from? So in Workspace, the incident disappears and the change record is the only viewable record?

Yeah correct @Kieran Anson. This is what the expectation. Can we achieve this in Workspace ?

 

I would push back - that is a poor user experience and contravenes the benefits of Workspace.