on 10-09-2018 7:25 PM
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);
}
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.