Sending email from eScript
Get Attribute Value - Product Configurator
Debugging Siebel eScript - Write Property Set to file
Date functions in Siebel eScript
Here are some methods built in eScript that perform these operations.
Case Insensitive Query in Siebel by using LIKE operator !
Case insensitive query in Siebel means to query the database records using the LIKE operator in SQL. This type of SQL tends to be slow as they return more records than the equal (=) operator.
How to generate random number in Siebel eScript?
Accessing Field in Siebel Browser Script
This is because the browser script works on the DOM elements not the Siebel Objects. Siebel to support its syntax, publishes some of the objects and methods in the browser script.
There is a workaround to access field in the browser script:
1. Add a control in the applet with the required field.
2. Set the HTML Type of control to Hidden.
3. Add this control on the list applet as column or on the header (where buttons are placed) of the form applet.
4. Create usual script to GetFieldValue. Now you will be able to get the value inside the script.
There are also lots of restriction in the browser script as compared to Server Script, some of them being:
- TheApplication() in eScript is converted to theApplication() in JavaScript.
- We can not use theApplication().GetBusObject(), can only use theApplication().ActiveBusObject();
- Cannot Get and Set Field values that are not shown on the UI.
- Cannot use InvokeMethod("LookupValue") (this creates lots of troubles in developing multilingual prompts.)
Debugging Siebel - Creatng custom logs using Clib.fputs
When it comes to debugging Siebel application, no one beats the Siebel vanilla logs (events logs governed by environmental variables), but every developer use his own techniques to debug his configuration.
In this post I am discussing the way I debug my things.
I add following piece of code at every event that I want to monitor, and add my required parameters to it, and then just compile all the objects and run the scenario.
var date = new Date();
var fp = Clib.fopen("d:\\log.txt","a");
Clib.fputs("\n" + " BCPreInvokeMethod" + " " + date,fp);
Clib.fclose(fp);
In above code first line creates a date object that give the timestamp that will be written in the log file. Second line creates a file pointer that opens file/creates file in write mode. In next line Clib.fputs function writes string to the file.
We can now simply alter string according to our requirement, and get the exact output.
This way i get exact view of events and parameters in a flat file, that makes it really easy to understand the actual problem. If you are trying this code then you will get output something like :
PreInvokeMethod SetAspectSun Aug 02 2009 01:52:19
PreInvokeMethod SetAspectSun Aug 02 2009 01:52:19
PreInvokeMethod SetDefaultDurationSun Aug 02 2009 01:52:19
PreCanInvokeMethod DeleteRecordSun Aug 02 2009 01:52:19
PreCanInvokeMethod ShowQueryAssistantSun Aug 02 2009 01:52:19
PreCanInvokeMethod ToggleListRowCountSun Aug 02 2009 01:52:19
PreCanInvokeMethod ExecuteQuerySun Aug 02 2009 01:52:19
PreCanInvokeMethod GotoNextSetSun Aug 02 2009 01:52:19
PreCanInvokeMethod GotoPreviousSetSun Aug 02 2009 01:52:19
PreCanInvokeMethod NewQuerySun Aug 02 2009 01:52:19
PreCanInvokeMethod NewRecordSun Aug 02 2009 01:52:19
PreCanInvokeMethod PositionOnRowSun Aug 02 2009 01:52:19
PreCanInvokeMethod UndoQuerySun Aug 02 2009 01:52:19
PreCanInvokeMethod UndoRecordSun Aug 02 2009 01:52:19
PreCanInvokeMethod WriteRecordSun Aug 02 2009 01:52:19
PreCanInvokeMethod ShowPopupSun Aug 02 2009 01:52:19
PreCanInvokeMethod GetBookmarkURLSun Aug 02 2009 01:52:19
PreCanInvokeMethod FileSendMailSun Aug 02 2009 01:52:19
PreCanInvokeMethod FileSendFaxSun Aug 02 2009 01:52:19
PreCanInvokeMethod FileSendPageSun Aug 02 2009 01:52:19
It can be really helpful if you working on a new siebel application and doesn't know how things work.
Although it takes longer time to get the output, but it really helps when all other options fails.
How to use output of Business Service Simulator?
But have you ever wondered that can we use the output arguments of the simulation again as input to the next simulation?! Even i didn't really thought about this earlier, until in Acceptance test of our project i needed to reproduce the behavior of one my workflow in controlled manner.
At that time one of my colleague suggested me to use Move to Input in built functionality of the Siebel Business Service Simulator.
Lets see how it is done:
1. Go to Administration Business Service Screen and Simulate the first service.
In my case I first simulated EAI Siebel Adapter Service Query Method to generate Siebel message..
2. You will then see a record created in the grandchild Applet containing the output properties of the business service. Now if you want to use this output as input to another business service then there is one way to copy and paste value into the input or to use Move to Input button!!!
This button copies the output property set record to the input, and then these can be used to simulate another business service.see screenshot:
This is becomes very useful if our service is expecting derived inputs. By use of this we can simulate certain steps of workflow on the run.
Please let me know if it helps anyone. :)
Other Siebel Blogs
-
How to create cookies from server side? - Yes, you read it correctly, you can create cookies in the browser from the server side, and get your browser script to access them. This is enabled via Web...4 years ago
-
Use Open UI to Dynamiclly Manipulate Detail Tabs - In a screen with many view tabs it may be useful for process automation to minimize clicking on detail tabs if user does not need to navigate there when no...5 years ago
-
Oracle Database 12c In‐memory feature for Siebel Reporting and MIS Queries Optimization - Siebel database is optimized all DML are working fine with awesome performance but still we receive complaints when we fetch reports (few columns but fetch...7 years ago
-
Elastic List Applets @ IP 2015 - Before you start wondering, I have not accidentally written 2016 as 2015 in the title. If you are following the Siebel Updates then you would by now know t...8 years ago
-
Auto Fix the Product structure in Quote/Order Line Items - There are situations when due to some business requirements you make changes in the existing Products/Promotions (configured in Administration – Products s...8 years ago
-
Asynchronous Workflow With Real User Login - *Background* A common requirement amongst many Siebel customers, is to have the ability to run an asynchronous workflow under the real user's login. T...9 years ago
-
Change delimiter in MS Excel on Windows 7 - Hi guyz, This post is not related to Siebel. So, if you are not interested, please feel free to walk off right now 😉 Data Migration is a very important as...9 years ago
-
Siebel Task UI (TBUI) - Lessons Learnt - Part 7 - This is my seventh article discussing lessons learnt during proof of concept of the new Siebel technology: Task UI (TBUI).13 years ago
-
-
-