Skip to Content

Scripting Change Using session.utils.showOptionDialog

Good afternoon.

In SP3 we were using session.utils.showOptionDialog with "undefined, undefined" to present simple error checking messages to the users.

Now that we have moved to SP6, we find the "undefined, undefined" parameter is no longer working and the pop ups no longer present.

Has anyone encountered this issue?

This is the error:

Error during script execution:
InvalidArgument - showOptionDialog(): Please provide five parameters (title, text, msgIcon, msgType, onOptionDialogClose).

Kind Regards,

Cristin

session.utils.showOptionDialog("Error", "Error Message", 
session.utils.MESSAGE_TYPE_ERROR, session.utils.MESSAGE_OPTION_OK, undefined, undefined);
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 26 at 10:28 PM

    This works:

    session.utils.showOptionDialog("Error", "Error Message", session.utils.MESSAGE_TYPE_ERROR, session.utils.MESSAGE_OPTION_OK, onOptionDialogClose, "1");
    
    function onOptionDialogClose(decision, ID){}
    
    Add comment
    10|10000 characters needed characters exceeded

  • Feb 28 at 08:36 PM

    Hello Cristin,


    this works too:

    session.utils.showOptionDialog("Error", "Error Message", session.utils.MESSAGE_TYPE_ERROR, session.utils.MESSAGE_OPTION_OK, null, null);


    We had to disallow "undefined" because the SAP GUI for Windows has an issue with it as method parameter values and we are tying to ensure that scripts are written in a manner that will make them execute in all supported GUIs.

    Best Regards,

    Clemens

    Add comment
    10|10000 characters needed characters exceeded