Showing posts with label Error. Show all posts
Showing posts with label Error. Show all posts

Sunday, November 11, 2012

Browser Scripts–‘this’ is a problem

 

One issue I have faced numerous times with Siebel’s browser scripts is that the ‘this’ reference is not recognized when invoked in a separate function.

This code works fine when written directly in the PreInvoke section of the applet:

function Applet_PreInvokeMethod(name, inputPropSet)
{
    if (name == "CustomMethod")
    {
        alert(this.Name());
        return ("CancelOperation");
    }
    return ("ContinueOperation");
}

 

But if you decide to move the code into a separate function of its own:

function Demo()
{
    alert(this.Name());
}

function Applet_PreInvokeMethod(name, inputPropSet)
{
    if (name == "CustomMethod")
    {
        Demo();
        return ("CancelOperation");
    }
    return ("ContinueOperation");
}

..the system will start giving errors saying method not defined.  This really gets in the way when there is not of field access and manipulation required in the function. One way out is to pass the this reference directly as an argument into the function.

function Demo(applet)
{
    alert(applet.Name());
}

function Applet_PreInvokeMethod(name, inputPropSet)
{
    if (name == "CustomMethod")
    {
        Demo(this);
        return ("CancelOperation");
    }
    return ("ContinueOperation");
}

 

Another way I have seen recently is to use a global variable for the applet and use that instead of the this. The variable has to be initialized in Applet_Load event

declarations()
{
    var g_oApplet;
}
function Applet_Load()
{
    g_oApplet = this;
}
function Demo()
{
    alert(g_oApplet.Name());
}
function Applet_PreInvokeMethod(name, inputPropSet)
{
    if (name == "CustomMethod")
    {
        Demo();
        return ("CancelOperation");
    }
    return ("ContinueOperation");
}

Tuesday, April 26, 2011

Siebel 8.1 menu items not opening in IE 8.

Another issue I ran into in IE 8, regarding the Siebel 8.1 Mobile client. This issue was reproduceable on both debug and non-debug modes.

After the mobile client opened up fine, none of the menu items inside the UI framework would open. The menu items at each applet would not drop down, and even the Help->About View would not open up.

At first I thought the pop-up blockers were playing spoilsport again, but the problem persisted even after pop-up blockers were turned off.


Then , a colleague suggested making a change to the client CFG file. In my case, it was scomms.cfg.

1) Open the client CFG file.

2) Find this line :

               EnableFQDN               = FALSE

3) Change it to :

                EnableFQDN               = TRUE


And that fixed the problem !! I don't know what FQDN has to do with menu items, maybe its something wrong with the UI framework.

Monday, April 25, 2011

Siebel 8 debug mode problem with Internet Explorer 8 ?

The last few months have been some of the worse in my career so far. The hectic project schedule and huge amount of "last minute changes" left me very little time to relax. Hopefully, its all going to change soon.


I am working on Siebel 8.1, and had Internet explorer 7 running, which ran without any issues. After an upgrade to IE 8 (thanks to the IT guys), I found that the Siebel debug mode would no longer open. The IE window would open up and throw a  "page not found" error. But the Siebel client would open fine, when started via its own shortcut.


A little experimenting, and I found that inorder for the Siebel 8.1 debug mode to open up in IE, there should be no other instances of IE running. Just kill all other IE instances, and simulating the workflow should be fine.

Not sure if there is another way to fix this.

Friday, June 11, 2010

You cannot execute a query using the % field.(SBL-DAT-00401)

Found a really annoying oracle limitation today. One requirement involved querying in a BC Field which had a column of type long behind it. I didn’t think twice and implemented this with a little bit of scripting. The script compile and ran fine on my local machine. But once I checked in and got it compiled, it got this error

 

You cannot execute a query using the %1 field.(SBL-DAT-00401)

 

And I found this from supportweb:

 

https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=539572.1&h=Y

 

The Oracle RDBMS does not support queries on LONG columns - Siebel Technical Support testing just confirmed that this restriction that is documented for Oracle 8 already still exists in Oracle 10.

http://download-east.oracle.com/docs/cd/A58617_01/server.804/a58241/ch5.htm

Restrictions on LONG and LONG RAW Data
Although LONG (and LONG RAW; see below) columns have many uses, their use has some restrictions:
- Only one LONG column is allowed per table.
- LONG columns cannot be indexed.
- LONG columns cannot appear in integrity constraints.
- LONG columns cannot be used in WHERE, GROUP BY, ORDER BY, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements. ...

 

But I had a perfect working code on my local db. How could that be ? The next line in supportweb explained this.

 

The SQLAnywhere Database Engine that is used for the Siebel local database does not have this restrition, so the query is working there.

 

Great !! Now I have to find another way out. Any suggestions ?