Friday, June 11, 2010

Ever faced Siebel crashes??

I thought to share my experience of Siebel Crashes and also would like to know if you faced one and the corresponding fixes.

This behaviour came up while using scripting with Siebel. We had made a business service (BS) which was called from button clicks both from browser side and server side. When we called the BS from browser side went out of context, called it from server side went out of context and then again called from browser side.. boom .. Siebel crashed. Probably blame it on the Siebel architechture. There are two ways we tried to fix it. First approach was to make the design change and call the BS only once. Second approach was also design change and to do away with the browser scripts and we moved all the code to the server side and it worked fine.

Wednesday, June 9, 2010

Dynamic Labels/Controls in Siebel Form Applet

I got a requirement from business to make around 10 form applets and also give them access from some admin screen to make new applets on run-time. The applets are more of question and answers. So, we came up with dynamic labels/control on Siebel Form Applets.  Below is how it's done.

Create a new control (DynamicLabel) in the form applet with HTML type as PlainText.


This control is mapped to a field (Field A) on the BC. 

As there were 15 different applets in this case, so we had a field with 10 diffrent values which we had finalised and 5 more free values. (These values were from a picklist and let's call it Field B for now.)

Now, we made a calculated field Field A and based on the value of Field B we made caption A, caption B and so on (till 15 new captions) to a last value which was blank.

So to say, if Field B value was "Action" we would display "My Action" in the Field A and if Field B value was "Event" then we displayed "My Event" in Field A. If there were no matching values then as calculated field had a null value therefore, this label did not display on the Form Applet.

As for the Control, we used browser script to display or Hide the control based on the value of Field B. This control can be of Text or TextArea. Siebel has a limitation that browser script can only hide dynamically controls of type CheckBox, ComboBox, TextBox, TextArea, Label.

Using HTML type as Plain Text for the caption has the advantage that it is no longer dependent on the browser script to hide the control and in real time when the value is null then it does not display at all and feels like as if nothing is present at that location in the form applet.