Trace On-The-Go for Siebel Scripts

“Trace” statements in Siebel eScript (or even in Siebel VB for that matter) provides a good way to debug and know what indeed is going on in the background. It is common enough to use the following statements to do debugging in scripts:

TheApplication().TraceOn("c:\trace.txt", "Allocation", "All");
...
...
TheApplication().Trace("Committed to the change " + rowId);
...
TheApplication().TraceOff();

While this is easy enough, an additional flexibility to trace only when required works out better. The on-the-go trace functionality can be easily accomplished using VB Script (not to be confused with Siebel VB).

  1. Open Notepad and type the following lines
    'Reference SiebelApplication object
    set oSiebelApp = CreateObject("TWSiebel.SiebelWebApplication.1")'Start tracing with appropriate parameters. Uncomment one of the options
    oSiebelApp.TraceOn "C:\sbl-trace.txt", "Allocation", "all"
    'oSiebelApp.TraceOn "C:\sbl-sql-trace.txt", "sql", "all"'Continue tracing until stopped
    set wshell = CreateObject("Wscript.Shell")
    wshell.Run ("%comspec% /c title COGSiebelLog & echo Tracing in Siebel is currently on. & pause"), 1, true'Stop trace and destroy object oSiebelApp.TraceOff
    set wshell = Nothing
    
  2. Save the file and close it (assume the file is called “COGSiebelLog.vbs”)
  3. Open Siebel client as always, navigate to the specific screen of interest
  4. Double click on the VBS file to run the script
  5. Perform the transaction that needs to be traced, hit ‘Enter’ in the command prompt of the running script after the transaction

You will find that the trace happens only when the VB script is running. You would still need to have ‘Trace’ statements in the script for any custom tracing though. A similar approach can be applied for SQL tracing as well (refer to the commented line in the above script).

Comments powered by Disqus

Related Posts

What is Salesforce Data Cloud (with use cases)?

Salesforce Data Cloud helps companies unify customer data from various sources, gain insights into customer behavior, and deliver personalized experiences across channels.

Read More
More Social Capabilities in Zoho CRM

More Social Capabilities in Zoho CRM

I have written about Zoho CRM before, and also about basic capabilities to track social network profiles without any customization.

Read More

How to start with Lightning Experience?

Lightning Experience is going to be the all new Salesforce for your users.

Read More