Tuesday, November 13, 2012

Happy Diwali!!

Troubles as light as Air
Love as deep as Ocean
Friends as solid as Diamonds
And Success as bright as Gold
These are the wishes for you
And your family on this festive season...






Tuesday, October 23, 2012

Symbolic String Locator


As an addendum to my previous post here i publish a mini symbolic string locator. It can help you to identify at what all places any particular symbolic string is being used. As a part of beta release it searches only at the Applet(List + Control) level. It is available in Downloads section also.

This can be of real help in scenario when you are asked to modify any existing symbolic string value and you have to look at objects to compile. The advantage of this tool is you don't have to open any sort of siebel client on your machine while running it. Only you have to remember the DSN name, the one given in the CFG for local client. It takes two parameter as input.

Local DSN = The DSN name of your siebel local client and Username/Password.

Symbolic String = The symbolic string to search.

The Objects sheet gives you flexibility to search the limited objects. The output for each object type is captured in respective object sheet.  If it errors out after giving correct DSN name make sure you have selected "Microsoft ActiveX Data Objects Library"  in your excel references. Once again valuable inputs/suggestions/comments are always welcome.


Happy Crunching!!

Monday, October 15, 2012

Symbolic String Compilation

Issues are multifaceted. They can teach and piss you off at the same time.

Recently we faced a simple-cum-silly issue while changing the symbolic string. I have modified the string value of existing string but to my surprise the new value was not getting reflected in the applet. It is only after the compilation of Applet,where this symbolic string is being used, changes were reflected. This is because objects may store the string name rather reference.

Ideally the compilation of symbolic string should have sufficed but unfortunately we have to compile all the underline objects where it is being used in order to confirm the change.


This gives rise to bigger question how to know at what all places any particular Symbolic String is being used. Repository search can aid but again it can force you to wait for ages. I am in process of creating a tool which will take any Symbolic String as Input and will list all the objects where it is being used. Hope to put for global audience for comments soon.

Happy Crunching!!

Monday, September 10, 2012

Profile Hunter 1.0


Off lately i have been involved in the training and knowledge transfer sessions so delay in writing post. Trust me training is definitely not the best part of job. In one of the sessions i was asked a scorcher of question.

Is it possible to find all the places where we have used any profile attribute including tools and client side artifacts ?


This prompted me to learn some excel vb and i have come up with an alpha profile hunter tool which guns down profile attributes used in client side artifacts. This tool is available for you for download and trial. It is also available under Downloads link.It takes profile attribute you have specified and searches this attribute in below objects

Personalization Applet
Personalization Applet - Rule Set
Personalization View
Personalization - Rule Sets
Runtime Events - Objects
Runtime Events - Action Sets
DVM
DVM - Rule Set

A simple SWOT analysis will give you a better detail.

Strength
- It searches for given Profile attribute across all configurable client side artifact where we can use GetProfileAttr or SetProfileAttr methods.
- It gives results in the Output sheet which can be very useful in any support or maintanence project.
- It is easy to configure.
- It is flexible enough allowing user to select or deselect objects to be searched.
Weakness
- When searching across all objects watch out for performance.
- As it is based on Siebel mobile web client automation server it needs dedicated or mobile web client running in background.
Opportunities
- With ever increasing configuration and customization, this can be very handy tool for maintanence of project.
- Most of the time development is done by some team and support by other. In such scenarios this tool can be very helpful.
Threats
- Unattractive UI
- It doesn't search in siebel repository for profile attribute in this release.


Regarding search on the tool side there are already couple of options available including siebel repository search and awesome Oli has developed terrific repository analyser. I am also in process of enhancing this to make it search on tools side artifacts. As usual as it is in crude phase any input, suggestion and comment to improve are most welcome.

Happy Hunting!!

Disclaimer: It can be taxing on system to search on all objects, please do a dry run by selecting one or two objects to search in order to ensure it is working fine on your machine.

Tuesday, August 7, 2012

Confirm in Standard Interactivity

"Confirm" function in javascript is as powerful as batmobile which work as check for users prior setting or clicking mission critical values. It allows developer to seek user blessings if they want to perform particular operation or not.In ongoing series on Standard Interactivity, here we will discuss usage of "Confirm" and use the result to set/reset values in SI mode.

Problem Statement: In eService Portal, whenever user is changing status values, he/she should be prompted with confirmation message and based on Yes/No values should be set.
Solution: As in HI client it is cake walk solution to implement where one can use BS "PreSetFieldValue" event of BC. However with SI client under question things become different with architectural limitation. The solution is orchestrated using the DOM events available in SI application. Following piece of browser script code is written on onfocus and onchange events. The key here is to determine the sequene of events. onfocus happens before onchange event for Status column.

general declaration:
var preValue;

function Edit_SList__0__Column__Status__onfocus (applet, id)
{
preValue = document.getElementById(id).value; // Fetch current value of status
}

function Edit_SList__0__Column__Status__onchange (applet, id)
{
if(confirm("Are you sure you want to change Status"))
{
document.getElementById("WriteRecord").click();
}
else
{
   document.getElementById(id).value = preValue;
   document.getElementById("WriteRecord").click();
}
 }
This will set/reset the values of status column based on user consensus. A curious mind by now must be thinking can we have Confirm on button click also. Yes we can. My support(ID 745518.1) already have solution to that.

Happy Crunching!!

Tuesday, July 31, 2012

Changing Font and Color

"Mere color, unspoiled by meaning, and unallied with definite form, can speak in thousand different ways." -- Oscar Wilde
Status bar is a common feature in siebel where color encoding depicts the status of record. I recently encountered similar scenario where i had to display different coloured text based on certain conditions on Form Applet. Browser script clicked me first. But finally this was achieved using configuration. As i struggle to achieve similar result in List applet we will discuss how on Form applet desired could be done. Lets take Service Request entity as an example (offlately this is becoming my favourite entity).

Problem Statement: If SR has some related SR then it should display some text in Red else alternate text in green.

Solution:

a) Go to SR buscomp. Create following fields

Name: PastSRRed
Calculated: True
Calculated Value: "< font color='red' > "+"This SR has related SR." +"< font > "

Name: PastSRGreen
Calculated: True
Calculated Value:  "< font color='green' > " +"No related SR found" +"< font > "

Name: PastSRDisplay
Calculated: True
Calculated Value: IIF(Count("SR") > 0,[PastSRRed],[PastSRGreen]) // In this SR is the name of multivalue link between SR and related SR bc.

b) Go to SR form applet, where text needs to be displayed. Create following control.

Name: PastSRDisplay
Field: PastSRDisplay
DisplayName: PastStatus
HTML Display Mode: DontEncodeData

Compile BC/applet and lookout for changes. But to fetch this on list applet is still mystery for me. Any thought on list applet will be of great help.

Happy Coloring !!

Explicit Write in Standard Interactivity


Offlately i am working on SI application and being bombarded by lot of user acceptance issues. I am not sure whether God is really happy or its just a clearance sale that most of the time we are able to find the fix. Recently we were being asked to implement explicit write sort of scenario in standard interactivity portal. In the detail applet for service request user didn't want to click Save button to save the record instead it was required as soon as details in the Description are filled record should auto save.

Again browser script comes to party. As browser script on standard events of Applet/BC doesn't work under SI architecture, only control level events are supported. Ever friendly Alex has beautifully explained the browser script architecture in his recent post. So idea here is to explicitly call the click event for "Save" button on the applet for OnChange event of Description column. Fortunately for us most of the fields on the applet were auto populated and read only so this solution is not that performance taxing.

However the key to this solution remains the HTML attribute property of the "Save" button control. As siebel generates its own SWE html ids(like s_1_1_6_0) so it becomes very important we give custom id to this button in order call it in other events. This can be achieved by adding below attributes to the control in tools.

HTML Atttribute: id=WriteRecord 

Once the id is associated with button control, we can easily call below code from OnChange event:

function Edit__0__Control__Description__onchange (applet, id)
{
if(document.getElementById(id).value != "")
{
document.getElementById("WriteRecord").click();
}
}

This approach though has some inherent disadvantages as this can be only used when controls/columns in the Form/list applet are less. Any other approach/idea/comment to achieve explicit write functionality in SI application is always welcome.

Happy Crunching!!