SIEBEL: How to Trace Browser Script

Thanks to to giving a code to trace the browser script in Siebel.
Below code is directly taken from above mentioned url.
For tracing the browser script, you can follow the below procedure –
1. In Application Browser script, create new script with MethodName “trace_log”.

function trace_log(as_text)
 var MyWindow =",'DEBUG','toolbar=no,location=no,' + 'directories=no,status=no,menubar=no,' + 'scrollbars=yes,resizable=yes,' + 'width=400,height=300,left=20,top=20'");
 MyWindow.document.write(as_text + "<BR><BR>");
 }//end try
 alert("an error occurred in log " + e.message + "n" + e.toString());
 MyWindow = null;
 }//end main

2. Application Browser Script declarations write –
top.log = trace_log;

3. Now you can call top.log(“text”) function from any Browser Script(Application, Applet, BusComp, Business Service) , it will write logs to a pop-up window.

Or you can copy below code to know the applet event

top.log("Applet_PreInvokeMethod: " + name + " " + TheApplication().GetProfileAttr("i"));
 TheApplication().SetProfileAttr("i", parseInt(TheApplication().GetProfileAttr("i")+1));

JavaScript parseInt() Function
Thanks to for giving description for Javascript parseInt() function.
Below code is directly taken from above mentioned url.

Definition and Usage
The parseInt() function parses a string and returns an integer.

The radix parameter is used to specify which numeral system to be used, for example, a radix of 16 (hexadecimal) indicates that the number in the string should be parsed from a hexadecimal number to a decimal number.

If the radix parameter is omitted, JavaScript assumes the following:
If the string begins with “0x”, the radix is 16 (hexadecimal)
If the string begins with “0”, the radix is 8 (octal). This feature is deprecated
If the string begins with any other value, the radix is 10 (decimal)

parseInt(string, radix)

Parameter                                       Description
string                                                     Required. The string to be parsed
radix                                                       Optional. A number (from 2 to 36) that                                                   represents the numeral system to be used


Categories: Siebel

Tags: , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: