How to Invoke ShowPopup using Script

There are lot of posts about how to use ShowPopup and invoking it through configuration. Almost all the post say that showpopup cannot be invoke through scripting. This isnt completely true. I was going through the support web when I found a page about how to invoke popup applet using browser side scripting.

The Doc Id ID 812853.1. I am just pasting the code section of the Support web Document here.

function Applet_PreInvokeMethod (name, inputPropSet)
{
if (name == "MyShowPopup")
{
// invoke the ShowPopup applet method
var psIn2 = theApplication().NewPropertySet();
var psOut2 = theApplication().NewPropertySet();
psIn2.SetProperty("SWEMethod","ShowPopup");
psIn2.SetProperty("SWESP","true");
psIn2.SetProperty("SWEView","Order Entry - Line Items View (Sales)") ;
psIn2.SetProperty("SWEApplet","Order Entry - Line Item List Applet (Sales)") ;
psIn2.SetProperty("SWETA","Product Popup Applet");
psIn2.SetProperty("SWEM","Edit List");
psOut2 = this.InvokeMethod("ShowPopup",psIn2);
return ("CancelOperation");
}


If we try to invoke the ShowPopup from a server side script. We would be getting the below error.

Method 'ShowPopup' requires a value for argument 'SWETA'.(SBL-UIF-00355)

Note from Siebel: To open Popup applet, please note that the method "ShowPopup" is a specialized method that cannot be accessed via script.
i.e. if something screws up, niether the Author nor Siebel is responsible...:-)

Use the above code and you would have Zapped your Siebel!!!

No comments:

Post a Comment