Siebel Open UI, Tools, Scripting and EAI (MOSC)

MOSC Banner

Problem faced in using 'with' in eScript.

edited Apr 15, 2013 11:15PM in Siebel Open UI, Tools, Scripting and EAI (MOSC) 3 commentsAnswered
Hi All,
Following is the piece of code written in applet server script preinvoke event.

function WebApplet_PreInvokeMethod (MethodName)
{
if(MethodName == "ApplyCC")
{
var bcDiscMtrx=TheApplication().GetBusObject("Adj ustment Group").GetBusComp("Product-Based Adjustment");
with(bcDiscMtrx)
{
ClearToQuery();
SetViewMode(AllView);
ActivateField("Field1");
ActivateField("Field2");
strSearchVar= "<valid search spec>";
SetSearchExpr(strSearchVar);
ExecuteQuery(ForwardOnly);
var isRec=FirstRecord();
if(!isRec)
{
TheApplication().RaiseError("ERROR_MESSAGE_1");
}
}

}
}


I have checked the logs, in the above script, search spec is formed correctly. Ouery triggered in the log returns 1 row. So FirstRecord() should return "true" right?? But the value obtained in "isRec" is "false".

And if I remove "with" and use the normal way object.method()", then FirstRecord() returns true.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center