We have a script in non auto generated HTML for creating a work object that needs to open in new tab

Hello Everyone - Looking for some suggestions on dealing with an issue post migrating to Infinity 24 from 7.1.8.

We have a script in non-auto generated HTML to create a Work Object in a new tab which is working fine in our current version of 7.1.8.

Post migration, Work Object is getting created but it is opening in a new window instead of a tab.

Please advise if anyone has encountered such issue and were able to resolve it.

@Prabhakar25 - Can you please share the code used in 7.1.8

Thank you.

@Priyanka Boga

Below is the script added to a non-auto generated section. This section is embedded in the section where the function(searchID) is invoked on a button click.

<script>

function searchID(){

var sURL = new SafeURL("Data-Portal.ActivityName");

sURL.put("pzPrimaryPageName","pyDisplayHarness");

var callback={

success : function(oResponse)

{

var strResponse = oResponse.responseText;

if (strResponse == "error"){

pega.u.d.reloadSection(pega.u.d.getSectionByName("SearchSection","",""),"","",false,true,'-1',false);

}else if (strResponse == "CreateNewWO"){

createNewWork ('ClassName','', 'FlowName');

}

},

failure:function(oResponse){

}

};

 var request = pega.util.Connect.asyncRequest('GET',sURL.toURL(),callback);

pega.util.Connect.handleReadyState(request,callback);

}

</script>

@Prabhakar25 Can you try below code replacing line

var request = pega.util.Connect.asyncRequest(‘GET’,sURL.toURL(),callback); pega.util.Connect.handleReadyState(request,callback);

window.open(sURL.toURL());

Thank you.

@Priyanka Boga Update the layout in parent harness from Panel Set to Screen layout which resolved the issue. Thank you.