Friday, February 27, 2009

Display in Page/Site Map : A Screen View Property

I was investigating a simple issue with my friend yesterday in which the newly created view was not visible under the screen. Sounds very simple right, that you have created a view and we just need to add it under the screen and also under the user's responsibility. Once you do that, the view starts appearing on the UI, but here this was not the case. My friend has also followed the same steps but still not able to see the view on the UI.

To debug this, I also cross-checked that the view was present under the responsibility and properly added under the screen as well. But its a surpise for anyone that still the view is not visible.

Well, let me tell you what I tried and then able to figured it out the root cause.

I created one more copy of the view with a different name and added the new view under the same screen where the original was added. Added it under the user's responsibility as well and compiled the SRF. And as per the expectation, this copied view was visibile on the UI with no issues. That means there was something wrong in the configuration with the original view. I queried for both the view under the Screen in Siebel Tools (Screen View) and compared the various properties and found that "Display in Page" & "Display in Site Map" property was not checked for the original one and this was the reason behind this issue.

Sounds very strange, but not sure how come these both properties was unchecked. And I was able to found out the reason because when I done new record in "Screen View" objects under Screen, to add the copied view under the same screen, "Display in Site" & "Display in Page Map" property get checked by-default. So finally we got the know the reason for the issue.

Sometimes we never know, a simple check box can do wonders in Siebel :)

Check it out !!!!!!

.

Thursday, February 26, 2009

Siebel High Interactivity Framework

First time I installed Siebel 8.0 on my new laptop and tried opening Sample Dedicated client but system prompt a message saying that :

"Your version of the Siebel High Interactivity Framework for IE, required for use of this Siebel application, may not be current. In order to download a current version of the Siebel High Interactivity Framework, please ensure that your browser security settings are correct and then log in to the application again. Consult your system administrator for details about the Siebel High Interactivity Framework and correct browser settings"

Now, this seems very easy as it was just asking for download it and everybody know when you open Siebel client for the first time, it automatically get downloaded on to the machine.

But, now let me tell what was the issue I was facing and how I got rid of it. When this message was appearing in, a bar was appearing under the Address bar in the Internet Explorer (to install the ActiveX Control) which requires a click so that it can install the Siebel High Interactivity framework (SHIF), but I was not able to click on that because at that moment the popup message was on screen with the "Ok" button. Once I click on "Ok" Siebel client gets closed since SHIF was not there. Again tried opening Siebel client, again the same message with Ok Button and the bar was appearing at the top of the screen where I can't click. Clicked on "OK", Siebel client got closed...... frustration!!!!

I thought it was due to some pop-up blocker or something, so I tried to change the browser settings but didn't get rid of it. Finally got one trick by which it got resolved. Here it is :

While opening Siebel Client, keep pressing "Ctrl" button on the keyboard and observe the difference. This time I didn't get the prompt message and automatically it prompt with the message of installing the SHIF and I clicked on Install and everything worked fine after that..... no issues.

.

Saturday, February 7, 2009

EnableObjectCOCI : Siebel Tools CFG Parameter

One of my colleague wants to check out an Siebel Object in tools but he was not getting the "Check Out Object" option when do a right-click on that particular object. While he was able to check-out any Project successfully via "Menu -> Tools -> Check Out". But the same thing was not happening with my Siebel Tools, I was able to do the both cases : a) able to check-out a separate object and b) able to check-out a complete project as well.

While working in Development team, a developer not always check out a complete project, if requires only a single object. Checking-out a specific/required object is the right approach to work in a Development team, so that multiple developers can check-out the various objects from a single project as well.

Now the question was why the "Check Out Object" option was not coming when right clicked on any of the Object in Siebel Tools?

And here is the resolution for this kind of behaviour :

Actually what happens is, we have a CFG parameter in Siebel Tool's CFG file with name : "EnableObjectCOCI" which should be TRUE if developer is allowed to Check-out an object in Siebel Tools. otherwise this option will not appear at all.

So, we added this parameter with TRUE value under [Siebel] section of Tool's CFG file and restart the Siebel Tools and "Check Out Object" option start visible now when right clicked on any Object (Provided "Enable Object Locking" flag was checked for that particular project).


Update:

Following registry also needs to be updated to get this resolved.

For 64 Bit -
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ORACLE_CONNECTION_NAME]
For 32 Bit -
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ORACLE_CONNECTION_NAME]
  • PacketSize = 0
  • EnableScrollableCursors = 0
  • ColumnsAsChar = 1
  • ColumnSizeAsCharacter = 1

.

Friday, February 6, 2009

Exporting records from List Applet in Siebel

Debugging an issue, which is completely related to a Vanilla process in Siebel, is really a difficult task. Moreover, I will say that, for this particular issue you won't find anything in Object Manager log, then you might start scratching you head in thinking how should I move further now to debug this issue.


One of our application user was trying taking an export of records from list applet and he was getting "The Page cannot be displayed" error and before this error Siebel screen blinks for sometime along with the export window and user has to forcefully kill the Siebel session. The record count was around 8K and most surprising fact about the issue was when I was trying taking export from my machine for the same exact set of records, it was working fine. I tried on some more machines and I was able to take the export successfully. The question came into my mind : "Is Export record functionality is machine specific??"............ frustration !!!!

==> Export on Dedicated Client was working fine.

==> Export on Thin client from my machine was working fine.

==> Export on Thin client from some more machine (where I tried) was working fine.

==> No clue in the Object Manager log.

==> No Siebel Error on the UI. The error what user was getting : "The Page cannot be displayed".

Now, its the time to do a Screen sharing session with the user and see what exactly is happening.

I asked the user to take the export for around 100 records and see whether export is at all working on his machine or not. And to the surprise, it worked. That means :


1. There is something wrong with the data thats why it is not getting exported.

OR

2. The data size being exported is so huge in size that Siebel cannot handle.


To investigate the first point mentioned above (From User's machine)

a) I prepared a query which will fetch exact records and columns from the database that user wants to export. Ran the query in SQL Developer and exported the data.

b) Scroll into the list applet uptill the last record to check if some junk is stopping the export process. Because if any junk data would have stopping the export process then it would certainly stop in scrolling as well. But what I observed is that, no issues in scrolling uptill the last record.

So, first point metioned above is not the culprit.

To investigate the Second point mentioned above (From User's machine)

While export process, Siebel pulls out data in chunks of 1000 records. Keep that chunk in some temporary space and then pulls the next 1000 records. This is the way it works. So it seems to be issue with less temporary space and its nothing but Internet Temporary File space.

So, to check for it, go to : "IE -> Tools Menu -> Internet Options -> General Tab -> Settings". Check for the size of "Temporary Internet Files Folder" and got surprised when I see that number was only 2 MB. The recommendation is 640 MB.

So, finally we found the culprit and corrected the temporary files folder size to 640 MB and tried taking the export.

And Everything worked fine........ hhhhoooo. Yes. We did it again !!!! Issue closed with resolution :)
.

Wednesday, February 4, 2009

How to Enable a Customized button on an Applet?

Applets (Form applet / List applet) in Siebel are so robust in nature, that apart from using vanilla functionalities, user can also invoke its customized process/functionalities. And the very simple way is to use a Customized button on the applet with the proper caption, so that when user clicks on the button, the respective process gets start.

So, whenever there is a requirement to put a Customized button on any applet, it is required to enable that button so that user can click on it. Siebel provides various ways to enable a button on any applet, today we will talk about all those ways :

a) PreCanInvoke Event Script

b) Named Method n : Applet User Property

c) "EventMethod" methods.

d) "CanInvokeMethod" : Applet User Property (Only used in Siebel 8.0 and above)

All the above listed ways are serving the same purpose i.e. enable a button on applet UI. Lets see in detail, how each one of them works. Lets assume the method being invoked by button click is : "siebelmantratestmethod".

1. First Method - PreCanInvoke Event Script



if (MethodName == "siebelmantratestmethod")

{

CanInvoke = "True";

return (CancelOperation);

}

2. Second Method - Named Method n : Applet User Property



Create an applet user property with the following details :

Name : Named Method 1: siebelmantratestmethod

Value : 'INVOKE', 'siebelmantratestmethod'

3. Third Method - "EventMethod" methods



a) No need to create an user property.

b) No need to write script on PreCanInvoke event

c) Just prefix "EventMethod" with the name of the "Method Invoked" (property of the control).

Method Invoked = EventMethodsiebelmantratestmethod

4. Fourth Method - "CanInvokeMethod" applet user property (Only available in Siebel 8.0 and above)



Create an applet user user property with the following details :

Name = CanInvokeMethod: siebelmantratestmethod

Value = TRUE


Points to be noted :

a) PreCanInvoke event script should be avoided as much as we can. The only scenario in which we need to write code in PreCanInvoke event is "Conditional" enabling/disabling of button.

b) EventMethod and NamedMethod are the mostly used ways and recommended ways for enabling the button. I am still not sure what is difference between the two. If you know about this, your comments are most welcome.

c) CanInvokeMethod - applet user property gives us the advantage of conditionally enabling of a button. But only available in Siebel 8.0 and above.

.

Required : A Field User Property

Siebel provides various ways in making any Field mandatory while saving the record. Some of the common ways we use in our daily Siebel implementation are :

a) "Required" property of BusComp's field. Setting this property to TRUE, made the field mandatory while saving the record.

b) "Required", a field user property which calculates an expression to decide whether the field should be mandatory or not. This is very useful for making field mandatory, conditionally.

c) Last one is writing script on "PreWriteRecord" event of business component.

I got the requirement to make "Spouse Name" field mandatory on the UI, when user checked the field "Married" to True.

The requirement sounds very simple but we should decide the best possible way to implement it. As I mentioned above, we can implement this requirement via two ways : first one is by writing code on PreWriteRecord event and the second one is by using "Required" field user property. Lets see the both implementation.

First Implementation - Scripting on PreWriteRecord() Event
if (this.GetFieldValue("Married") == "Y" && this.GetFieldValue("Spouse Name") == "")
{
TheApplication().RaiseErrorText("Spouse Name is a mandatory field");
}
Second Implementation - Required Field User Property
Create Field User Prop for "Spouse Name" field :
Name : Required
Value : IIf ([Married] = "Y", "Y", "N")
Compile the SRF by using one implementation at a time and see the difference.

Pros & Cons

1. Scripting solution is good if you need to show a customized message to the user, in case he forget to fill in the mandatory field. But scripting should be avoided as much as we can.

2. Using "Required" field user property is the recommended solution for such kind of scenarios.

.

Tuesday, February 3, 2009

Excluded : UI Property in Product Config

Product Configurator in Siebel is a complete world in itself. Recently when I get the requirement to implement a Country/State constraint (i.e. to display the States depending upon the value selected in Country) inside the Product Config, it sounds new thing for me. I thought of using "Constraints" of Product Config for this requirement, but let me tell you what exactly the scenario was.

I have two attributes viz. Country and State exposed on the UI of one Product. These both are enumerated attributes with the following values :

1. Country
Values = India, US

2. State
Values = Uttar Pradesh, Madhya Pradesh, Ohio, New York

Now, the requirement was when user selects "Country = India", he should not able to select "Ohio and New York" in state attribute and similarly when "Country = US", he should not able to select state as "Uttar Pradesh" or "Madhya Pradesh".

So, the requirement sounds very simple of its nature and anyone worked on Product Config can think of using "Constraints" here. I used "Exclude" constraint like this :

a) When the attribute Country = India excludes (the attribute State = Ohio OR the attribute State = New York)

b) When the attribute Country = US excludes (the attribute State = Uttar Pradesh OR the attribute State = Madhya Pradesh)

When I validated the Product and selected "India" in country attribute, the values "Ohio" and "New York" become red. That means system is showing me the values with different color which will violate the constraint that I have built. So I want to see what happen if I still select that value, in that case, system prompts me for the constraint violation and ask me for "Proceed"/"undo".

So, what I want to say here, though I have already used the Product Config's vanilla constraint (i.e. Exclude), system is still showing all the values (but violated values in diff color). But the requirement is just NOT to display the values at all.

To achieve this, you have use a "Product Config UI Property i.e. Excluded".

So I used this property on the root product with the following details :
Name : Excluded
Value : Y

Refreshed the product and validate and everything looks good now. No more values are displaying in State attribute which may violate the constraint.

.

Monday, February 2, 2009

Field Read Only Field : Business Component User Property

Vishnu (regular reader of SiebelMantra) asked me to put a post regarding making a field read only when some other field get set to some specific value. So this post is dedicated to you Vishnu.

Some might of you already know which User Property I am talking about. This is BusComp User Property : "Field Read Only Field".

Purpose :
This is a field user property which makes a field read only on the applet, depending upon the value of some other field.

Lets take an example and try to configure it. Suppose, on Opportunity business Component, there are two fields : a) Sales Stage b) Revenue. The requirement is as soon as "Sales Stage" = "Lost", user is not allowed to make any more change in "Revenue" field.

Lets how we can achieve this :
1. Create a calculated field:
Name = Revenue Read Only Calc
Calculated = TRUE
Calculated Value = iif([Sales Stage] = "Lost", "Y", "N")
2. Create one User Property at Opportunity Business Component :
Name = Field Read Only Field: Revenue
Value = Revenue Read Only Calc

That's it !! Compile the Opportunity Business Component and try to change the value of Sales Stage on the UI.

You can play with the Calculated expression to test some more scenarios using AND, OR clause.

Sunday, February 1, 2009

Mouse Hover Text for Siebel Form Applet's Controls

Again on the demand of our Client, we were able to found one unique feature in Siebel by which you can play with the "Controls" (button, textbox etc) available on any Form Applet. Thanks to Rahul (my colleague), who discover this feature. Once you are aware of this feature and just need to know the basic HTML programming, you can display the control the way you want. Sounds good !!! right??

Actually the requirement was to put a hover text on a TextBox (Account) displayed on Opportunity Form Applet. Let me tell you what a hover text is? It is basically a information about some field, which get displayed in a square box when you place mouse over the field.
OOB no feature is available on Control's property, which we can use to solve the purpose. You might be thinking of using "Prompt-Text String Override" property of control for this purpose, but I believe, this property just display the text in Status Bar when cursor is on the control.

So, for putting hover text on the control, we used "Caption - String Override" property itself. But here is a trick. We need to write the Caption along with the HTML tags, so that when this control get render on the UI with some additional HTML tags, we achieve what we are looking for.

Try this, change the Caption-String Override to :
<_label title="This is sample hover text">Account<_/label>
(Please remove the _(underscore) from the above text and then use. I used this for Account field on Opportunity Form Applet. Compile the SRF and see the magic.)

Some more I tried :

1. <_label style="BACKGROUND-COLOR: yellow">Currency<_/label>

2. <_b><_label style="COLOR: RED">OptyId<_/label><_/b>

So, the bottom line is, the more you know the HTML the more you play with the Caption on form applet.

Give it a try !!!!

.SPF file in Siebel

Sometimes in Software Professional's life, it happens that whatever he is doing/implementing is upto the mark and still not getting the right result. Well, after all the technology we are working-on has been built by people like us only and may be they might have done something mysterious which we are not aware of. So that is the time, we need to explore and find out the reason behind such behaviour....

The same thing happen with one of my colleague working on very simple requirement to increase the HTML length of one of the list column, displayed on Opportunity List Applet.

Sounds very simple... right?? So, to increase a Column Length of a List Column, what we need to do is :

1. Query for the specific List Column in Siebel Tools.
2. Increase the "HTML Width" property value to some significant number.
3. Compile the SRF and observe the change on the UI. If it doesn't look good, then you can play with the "HTML Width" property to increase/decrease the html length of the column.

Thats it ?? The answer is NO.

He (my colleague) followed the exact above mentioned steps and still observed that the HTML length of that particular List Column was as it was earlier. Thought that SRF might not have compiled properly, so compiled the SRF 2-3 times but not able to change the HTML length by a single centimeter.

Well, this is something strange that we observerd and after lots of investigation, we came to know about the reason behind this.

The culprit was .SPF file (Siebel Preference file), being created by the system for the user.

This is the file that Siebel creates for every user who logs into the application with the naming convention "'UserId'&'SiebelApplicationName'.spf" and stored in "//Siebel_server/Web Client/Bin" directory. This file actually stores the lot many information about the UI Changes that user can do on the UI. For Eg :

1. Increased/decreased HTML length of List Columns from the UI, that user might have changed according to his needs.
2. Order of the List Columns on the applet, in case user has changed any.
3. Order of the Screens displayed on the UI. (Application Menu -> Tools -> User Preferences -> Tab Layout)
4. "Recents Records" details being displayed on the "Home" views of various screen like Opportunities Home, Accounts Home etc.

So, the solution was just to delete this .SPF file from Server's Bin directory and restart the Siebel session.

Note: Deletion of this file will result in lost of all the preferences set the by user. Even I remember, due to this .SPF file only, we came across one another issue related to Views/Responsibilities. User was not able to see a newly added view under the Opportunity Screen, while the newly created responsibility was already been added to the user profile. Later we deleted the .spf file of the user and all worked well.