Sunday, September 19, 2010

Launching iHelp with eScript

Hey Folks,

I had a requirement with one of my clients to have a button on a Form Applet that opens the iHelp.

"My Oracle Support" has a few SR's that are related, and I had tried various things including trapping the method calls that are triggered when clicking on the iHelp button on the Toolbar, then repeating them on my custom button but with no luck.

Oracle support seems to confirm you can't Launch iHelp with Script in Siebel 7.7, but doesn't mention Siebel 8.1 (which probably means you can't do it!)

This however is possible through script. You could use the below code on the button to toggle the iHelp from a custom button.

Code:

function WebApplet_PreInvokeMethod (MethodName)
{
    if(MethodName == "LaunchiHelp")
    {
        var
oBS= TheApplication().GetService("Task Assistant UI Service");
        var
psInputs = TheApplication().NewPropertySet();
        var
psOutputs = TheApplication().NewPropertySet();
       
oBS.InvokeMethod("ToggleiHelp", psInputs,psOutputs);
        return (CancelOperation);
    }
}

Your custom button should now function exactly like the iHelp launch button on the toolbar.

Update (thanks to my colleague for sharing this)


I have had to add an update to the code so that it looks like this:

var psInputs = TheApplication().NewPropertySet();
var psOutputs = TheApplication().NewPropertySet();
psInputs.SetProperty("Command", "#14");

var oBS = TheApplication().GetService("Task Assistant UI Service");
oBS.InvokeMethod("ToggleiHelp", psInputs, psOutputs);

Without this parameter there are issues with opening / closing iHelp multiple time from different entities. It results in a Siebel crash and you have to log in again. With the command property it appears to work fine.

Just a word of caution: this command number is likely to be different in different version of Siebel. It is 8.1.1.2 SIA [21215] ENU that I have this working for.

Cheers!

No comments:

Post a Comment

Share/Bookmark