Object.prototype in ST-engine does not work (Doc ID 1575654.1)

Last updated on MARCH 02, 2017

Applies to:

Siebel CRM - Version 8.1.1.9 [23016] and later
Information in this document applies to any platform.
Checked for Relevance on 13-04-2015

Symptoms

On : 8.1.1.9 [23016] version, Siebel VB / eScript / COM

Using "Object.prototype" in ST-engine to add in new methods to the root objects and retrieve them from descendants (propertyset, etc) will throw out the following error occur. This works fine in T-engine.


ERROR
-----------------------
Unhandled Exception: 'f' is not defined" error


STEPS
-----------------------
The issue can be reproduced at will with the following script:
general declarations:
Object.prototype.f = myFunc;

function myFunc()
{
return ("a");
}

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
switch(MethodName)
{
case "Eval":

var myObj = TheApplication().NewPropertySet();
Outputs.SetProperty("f1", myObj.f());

break;
}
return (CancelOperation);
}

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms