Upgrade Issue 7.1.5 to 8.7.5 .

Hi team,

Actually, recently we have upgraded our application 7.1.5 to 8.7.5 .

Here 7.1.5 we have almost text files and paragraphs. That java script code not supported in 8.7.5 version.

That text file we have lot of functions to open modal dialogues in 7.1.5 version.

Those functions not supported in 8.7.5 version. I got this error

“OpenUrlInDialog API and window.showModalDialog are no longer supported. Replace by an auto-generated local action.”

In that function they used below step

var r = window.showModalDialog(strUrl,‘’,strFeatures);

this is exact code

function UpdateStatusProposal()
{

var strFeatures = “resizable=yes;status:no;dialogWidth:420px;dialogHeight:300px;help:no;maximize:no;minimize:no;scrollbars:yes”;
var strUrl = pxReqURI+“?pyActivity= classname.UpdateStatusProposal&pzPrimaryPageName=pyWorkPage”;
var r = window.showModalDialog(strUrl,‘’,strFeatures);

var oSafeUrl = new SafeURL(“A***––*** classname.LoadSPHarness”);
oSafeUrl.put(“pzPrimaryPageName”,“pyWorkPage”);
doFormSubmit(oSafeUrl.toURL(), null, null, event);

var oSafeUrl = new SafeURL(“A***––*** classname.GetSOSNumber”);
oSafeUrl.put(“pzPrimaryPageName”,“pyWorkPage”);
var SOSworkid=httpRequestAsynch(oSafeUrl.toURL(),“post”);

if(SOSworkid != “true”){
var sosassign = " classname "+ SOSworkid + “!SOSSCREENFLOW”;
openAssignment(sosassign,1);}

}

If you guys also facing same issue with that step in 8.7.5 version. pls help me out.

Otherwise, i need to create local action and use it. Without changing any existing functionality i try to change that step

@kirti

stop using custom JavaScript and move this into a modal Local Action. Create a flow action UpdateStatusProposal (as a Local Action) and put the server logic there: call activity UpdateStatusProposal, then LoadSPHarness, then GetSOSNumber to set a clipboard property like .SOSWorkID. On the UI, replace the text/paragraph JavaScript with a button or link that uses the standard action Launch local action → Modal dialog, and in the flow action’s post-processing run the activities instead of SafeURL/httpRequestAsynch calls. After post-processing, use Refresh-This section (or Reload harness) to reflect status changes. If .SOSWorkID is not “true,” add a post-processing step to open the assignment: use the “Open assignment” action (or openWorkByHandle/pega.desktop.openAssignment with the ID) rather than openAssignment() JS. This preserves behavior without window.showModalDialog/OpenUrlInDialog and is supported in 8.7.5.