Browser Script and CFG – Process Simplified

This is one of the coolest tip I have seen so far and this tip has been provided by Gaurav Gupta,
A friend of mine working in siebel from past 2.5 years and right now leading a siebel project with a team of 15 people.

This tip has elimnates the admin overhead we have to face while calling business services from browser scripts. Read and Enjoy.

At times we have the requirement to call a Business Service from “Browser Script” then it is necessary to make the entry of that “Business Service” everytime in .CFG file with the following syntax under [SWE] section of the CFG file:
ClientBusinessService X  = “<Business Service Name>”
Where X = 1,2,3,4……

To get rid of this,you can implement a new Generic Business Service which will internally call the Business Service that we want to call from Browser Script.

Name of Business Service  = CallBusSerFromBrowScript
Method Name                      = Service_PreInvokeMethod
Generic business Service Code :

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
if(MethodName == “GenericCall”)
var svc = TheApplication().GetService(Inputs.GetProperty(“BSName”));
svc.InvokeMethod(Inputs.GetProperty(“MethodName”), Inputs, Outputs);
svc = null;
return (ContinueOperation);

Procedure for Calling

Please follow the below code for calling your Business Service.
Lets say you want to call “MyBusinessService” with Method Name = “MyMethod”, then use the following code :
var input = theApplication().NewPropertySet();
var output = theApplication().NewPropertySet();
// passing the business service name and method name as input arguments to generic business service
// Generic Business Service with generic method

var svc = theApplication().GetService(“CallBusSerFromBrowScript”);
svc.InvokeMethod(“GenericCall”, input, output);
svc = null;
output = null;
input = null;
ToDo List ( Admin Team + Development Team  +  QA Team)
1. Please update the following code in .CFG file of your web client under [SWE] section with the name of Generic Business Service. This is to be done one time only.

ClientBusinessServiceX  = “CallBusSerFromBrowScript”
where X = 1,2,3………..  (total no. of BS called from CFG + 1)

TA DA…… once you are done with this, life become easy. Try it out !!!!!!!!!
This way you make the life of your Siebel-Admin people easier as they don’t require making changes in CFG file in every release 🙂

4 Responses to Browser Script and CFG – Process Simplified

Leave a Reply