Search here for wide range of results..
Loading
Home » Debugging Techniques, Scripting

How Trace Browser – Server Scripts in Siebel

24 April 2009 7 Comments

How to do Browser Script Tracing in Siebel

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)
{
try
{
var MyWindow = window.open(”,’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>”);
}//try
catch(e)
{
alert(”an error occurred in log ” + e.message + “n” + e.toString());}//catch
finally
{
MyWindow = null; }//finally
}//endfunc

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.

How to do Server Side Script Tracing

For tracing server events, write logs to a trace file.
1. Put this code in the declaration part of Application Server Script.

TheApplication().TraceOn(filename,”Allocation”,”All”);
Note: filename should be like “C:\Inputs\TraceFile$p_$t_.txt”

2. Use the below method to write to the trace file from any Server Script(Application, Applet, BusComp, Business Service) in Siebel.

TheApplication().Trace(“any text”);

Read some more similar posts

7 Comments »

  • Vivek (author) said:

    Trace sequence of events in Browser Script:
    top.log(”Applet_InvokeMethod: ” + name + ” ” + TheApplication().GetProfileAttr(”i”));
    TheApplication().SetProfileAttr(”i”, parseInt(TheApplication().GetProfileAttr(”i”))+1);

    Trace sequence of events in Server Script:
    TheApplication().Trace(”WebApplet_InvokeMethod: ” + MethodName + ” ” + TheApplication().GetProfileAttr(”i”));
    TheApplication().SetProfileAttr(”i”, parseInt(TheApplication().GetProfileAttr(”i”))+1);

  • KrisBelucci said:

    Hi, cool post. I have been wondering about this topic,so thanks for writing.

  • GarykPatton said:

    Hi. I like the way you write. Will you post some more articles?

  • admin (author) said:

    Thanks Gary and Kris.!!!

    Surely, I will be writing more posts……:)

    Pls register to this
    Blog http://feedburner.google.com/fb/a/mailverify?uri=OnlineSiebelTutorials-Bookshelf&loc=en_US , and

    Forum – http://www.siebelintegration.com/SiebelInterviewForum/index.php?action=register

    so that whenever there is a post you will be informed via email.

    -Vivek
    Admin

  • SS said:

    Hi Vivek

    just to confirm me if i was able to get the detals:

    if i have written a browser script on Applets XYZ event…then i need to add this function trace_log as one of the method on the object

    and later pass the data that i need to pass from that event to this function .?? is it rt??

    but i dint understand the part where u have mentioned
    ” Application Browser Script declarations write –
    top.log = trace_log. ”
    what is the significance of doing this????

  • Site Admin (author) said:

    Hi SS,
    This declaration is to assign the function the function named trace_log to a global variable that can be accessed in any browser script.

    top.log = trace_log

    Now, you can use top.log(”any string”) to log your message to the popped up browser window.

  • SS said:

    Thanks VIvek….will try and see :)

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.


Verify Code   If you cannot see the CheckCode image,please refresh the page again!