cancel
Showing results for 
Search instead for 
Did you mean: 

Warning Message while using showOptionDialog

sbaxi
Explorer
0 Kudos

We are using Personas SP07. I have a use case for showOptionDialog. During the call to showOptionDialog, a warning message alert pops up with text "stopAfterShowOption". When I click Okay, the optionDialog pops up and functions as expected. I am not able to figure out why this is happening and how to stop this. The alert pops up only when I am using the code within "try" and "catch" block.

I have attached the script code being used. Appreciate any help!

Thanks

Sudhir Baxi

function navHome(){
function onOptionDialogClose(usrAction) {
	if (usrAction === session.utils.MESSAGE_RESULT_YES){
		 var pattern = /sap/g;
		 var sURL = "";
         if (pattern.test( window.top.location.href )){
        sURL = window.top.location.origin + "/sap/bc/personas/?sap-ie=edge";
					}//portal_NO
		else {
	sURL = window.top.location.origin + "/irj/portal/fiori";  
        	}//portal_YES
	window.top.location.href = sURL;
	}//usrAction
		
}//optionDialogClose


//Confirm Action
session.utils.showOptionDialog(session.info.transaction, 
			   "Do you want to Exit?", 
			   session.utils.MESSAGE_TYPE_QUESTION,
			   session.utils.MESSAGE_OPTION_YESNO, 
			   onOptionDialogClose);
}


var sScriptInfo = "List v1.0";
try{
navHome();
} catch(err) {
	session.utils.alert( sScriptInfo + "\n" + err);
}

Accepted Solutions (0)

Answers (0)