How to Popup Applet through eScript

The script has been submitted by Rahul Madan a friend and an avid reader of Siebel Unleashed.

Requirement: On Click of hyperlink in a List Applet or on click of a button in a Form Applet an Applet should popup

Solution with Browser Script:

if (name == "Drilldown"){
var inp = theApplication().NewPropertySet();
inp.SetProperty("SWEH", "200");        //Height of popup
inp.SetProperty("SWEW", "800");      // Width of popup
inp.SetProperty("SWETA", "Dash Board Popup Applet");
inp.SetProperty("SWEM", "URL Applet");
this.InvokeMethod("ShowPopup", inp);
return ("CancelOperation");

Solution with Server Script:

if (MethodName == "Drilldown"){
var oServiceAF = TheApplication().GetService("SLM Save List Service");
var inputPropAF = TheApplication().NewPropertySet();
var outputPropAF = TheApplication().NewPropertySet();
inputPropAF.SetProperty("Applet Name","Dash Board Popup Applet");
inputPropAF.SetProperty("Applet Mode","6");
inputPropAF.SetProperty("Applet Height", "700");
inputPropAF.SetProperty("Applet Width", "700");
oServiceAF.InvokeMethod("LoadPopupApplet", inputPropAF, outputPropAF)
return (CancelOperation);

These scripts will not work if you have multiple drilldowns defined on the same applet. I will cover the solution to this limitation in my next post as part of final solution of hyperlink issue.

4 Responses to How to Popup Applet through eScript

  1. Neel,
    How can I get a pop up applet with browser script/escript where there is no button. Something like where a value of a field is changed. I have tried SLM Save List. The pop up comes up, if I write a code in applet-preinvoke event. But if I am doing it on prewrite/write event of BC. The pop up just goes spinning and nothing happens even if left for hour.
    Tried with browser script too..but that needed showpopup and I believe it’s from button.

    Any suggestion would be appreciated.

  2. Hi Neel, I read your articles all the time and im always impressed with all your knowledge and tutorials you write. As many folks, I am new to open ui and I have a project which has a very aggressive timeline. I have been working around the clock trying to solve what what I would think are basic request but have been unsuccessful in most (I have worked siebel for 12 but 0 web 🙁 )

    *I hope you can advise me on my current issue which I have spent over 12 hours trying to figure out.

    Basic Requirement: Add a button on applet (Using eService Open UI) and invoke a pop-up applet for the user to enter comments for the current record (SR comments for example). They would be on a form applet for same bc and record.

    I have done the following:

    1)Created a pop-up applet based on class : CSSSWEFrameListPopup for Service request bc. I basically want a form applet with 1 field for data entry (not sure if this is the correct class , there is a form class wit PopUp in name but all examples showed this one).. 2) Added web template with ‘Popup Form’ web template ‘base type’ , added button save/cancel onto form applet

    For the form which the button will invoke I added 1) New Control “PopUp”, method: ShowPopUp, Mini Button 2) Added Control user prop PopUp with value “applet name” and mode ‘base’ (also tried edit and didn’t work).

    I am getting the following error when I click the button: ‘Method ‘ShowPopup’ requires a value for argument ‘SWETA’.(SBL-UIF-00355)’

    I have also tried to do this in script and since above was not working, for pre-can invoke server script I have method .. can invoke with ‘Cancel operation’ and im getting ‘the method is not supported on bc …’ error. This is usually due to not having the ‘cancel operation’ in can invoke but I have it.

    Am I approaching this correctly or do I need to deal with a pm or pr script ?
    Thanks in advance.

    • Jasmine,

      This issue doesn’t seem to be due to open ui. It appears to be a basic configuration issue and I suspect that probably the applet that you have created is not having right class or the applet mode specified user property is wrong. Trying changing the class to CSSSWEFramePopup.
      Make sure your applet has edit mode defined and specify mode as edit in user property.
      I don’t have access to tools right now so cannot help you with specifics but based on your description it is not an Open UI issue.

  3. HI neel,
    My requirement is on click of the button a popup with Oedq results should come up in the lsit pop up applet.

    if(methodName== mymethod){
    var InvoiceBS = theApplication().GetService(“CCB Invoice Profile Verification”);
    var psIn2 = TheApplication().NewPropertySet();
    var psOut2 = TheApplication().NewPropertySet();
    psIn2.SetProperty(“SWEView”, TheApplication().ActiveViewName());
    psIn2.SetProperty(“SWEApplet”, this.Name()) ;
    psIn2.SetProperty(“SWETA”,”OEDQ CCB Residential Customer Popup Applet”);
    psOut2 = this.InvokeMethod(“ShowPopup”,psIn2);
    return (CancelOperation);

    this is on server script of the form applet.
    i am facing the same error what jasmine is facing .
    on click of button error comes up saying Method requires some argument to SWETA.
    My applet is active and with class CSSSWEFrameListPopup .
    I have tried with classes

Leave a Reply