Monday, January 23, 2012

Multilingual Confirm/Alert in Browser Script


Working with multilingual can be as challenging as playing tennis with rafael nadal on clay court. Siebel provides outstanding set up to enable multilingual application.

There are different object managers for different langauges. There are symbolic strings for multiple language references, there are message categories to enhance re-usability. Lookup's for value comparison in different languages and not to forget multilingual email templates along with BIP reports giving end user 100 percent localized effect.

There are still some non-localizable elements including log files and help applets. However while working on the browser side i was not able to translate the message in the desired language using "LookupMessage" method as it is only supported on the server side. In order to achieve localization we used below java methods to identify the language in url display message accordingly.

Lets say you want to display confirm box in french application probably this piece may help you to achieve desired results.


var sURL = document.location.href;
var sCount = sURL.search(/fra/i); // this will search for object manager language
if(sCount > 0)
var sMsg = "Décochez va supprimer les données, Voulez-vous procéder";
else
var sMsg = "Uncheck will remove the data, Do you want to proceed?";
if(confirm(sMsg))
return ("ContinueOperation");
else
return ("CancelOperation");


There could be alternates to achieve this. As i write, another issue related to multilingual is dangling in Stop step in workflow. Question is whether we can use LookupMessage function in workflows or not? Any thoughts on this are much appreciated.

Happy Crunching!!





Tuesday, January 17, 2012

Vision 2012



Welcome to 2012, year being panned for much touted release of Windows 8, Olympics, US presedential elections, iphone 5 and supposedly end of world but i am sure we are more interested in how Oracle releases siebel gems.


If anything to go by the last siebel release letter from oracle, 2012 seems an exciting year for siebel community. There are enhanced funtionality in the areas of


- Public sector 
  Enhanced eService application and appeal management system being the highlights.

Loyalty for Travel

Rapid deployment and easier management of complex promotions. Enhanced user experience, control and productivity. Enhanced loyalty engine performance being the key focus areas.

- Automotive
Enhanced warranty management and claims processing solutions.

- Life Sciences
Personalized Content Delivery features to enhance the interactive digital experience.

- Financial Services
Integration capabilities with Oracle FLEXCUBE for Banking customers.

If  that comet doesn't strike then stay tuned for more bombarding features/patches/versions from oracle.

Happy 2012!!!




Tuesday, December 27, 2011

Happy New Year!!


Time of year has arrived when travel plans, party plans presides over defects and status reports. So i take liberty of being non technical and thanks all readers across the globe for wonderful support and comments with very warm new year wishes.

May new year brings lot of happiness with less defects,more siebel patches, hefty pay hike, hot gal friend or boy friend (only for bachelors), trimmed waistline.

May you get a clean bill from your dentist, your cardiologist, your gastro-enterologist, your podiatrist, your mechanic and your plumber.

May your hair, your teeth, your abs and your stocks not fall; and may your blood pressure, your cholesterol, your white blood count and your mortgage interest rates not rise.

May New Year's Eve find you seated around the table, together with your beloved family and cherished friends.

May every day of the new year glow with good cheer and happiness for you and your family.

Happy 2k12!!

Sunday, December 18, 2011

Serialization - Sequence Generation


Christmas has arrived a week early for us. Generating records in numeric sequence numbers can be a burning requirement in any application but not when you are working with siebel.

Just when holidays were approaching and party mood was about take helm, we were asked to generate the payment requests associated with service request in sequence numbers (as third party system required that..no choice had to do it) . The first thought that struck was the usage of * Line Number (Sequence) BC based on the class CSSSequence. However the issue was for each Parent SR first payment notice starts from 1 as payment being child entity and the requirement was that sequence should start from 1000 and should be auto generated for every new record irrespective of Parent SR.

Fear of ending new year eve in office can do wonders and suddenly we found that this requirement could be fulfilled using "Serialization" instead of writing a script. This technique is extensively used for generating Case Serial Number/Claim Serial Numbers based on the region or year. We found it useful in our case. Mother of all siebel guides "Siebel Bookshelf" gives comprehensive details of configuring any custom BC to enable Serialization.
However, we had to run a minor update in order to start the sequence number from 1000. We created a new custom column "PAY_SEQ_NUM" in "S_CASE_SEQ_CTR" table and a custom field "Pay counter" which is used for sequencing in PUB counter business component for holding the sequence number. In order to start the sequence number from 1000 instead of 1 this field should pre-default with 1000. So that sequencing starts from 1000. There is also cool business service "PUB Case Serialization Service" which auto generates next sequence number in line.

PS: In order to have Serialization functionality available, make sure you are working on SIA version and you have access to Administration - Case view.


Happy Serialization!!






Monday, November 28, 2011

Hiding Custom Controls in Query Mode

"Yesterday it worked, Oops Today it is not working..."

This has to be my favourite line since i started my career. I was hit by the same nuke again by my team mate where we had to hide custom controls from the users in Query Mode. Some code was written to control the visibility of the custom buttons but it was failing in some conditions.

It is easy to control the above scenario when we have different applets for Edit and Query Mode. We can remove the custom button from the Query Applet and keep only on the Edit applet. However, things are little different in case we are using Edit List Mode. A custom code is viable solution but it is not full proof as there are chances that it may fail.
However Siebel comes again to our ally. For lucky developers who are working on SIA tools, there is a user property by which one can hide methods in Query Mode. 

Name: FINS Query Mode Disabled Method n
Value: Method Name 

The only catch here is the applet class should be "CSSFrameListFINApplication". So better test the entire functionality prior deployment.

Happy Configuration!!

Wednesday, November 23, 2011

Query within date range


Date range is one of the very common requirements across project. It eases out lot of tasks for end user, one can easily generate report or export data items within given date range. Recently we were asked to implement similar functionality by inputting From and To date from the end user and resulting in all Service Requests between the given date range. There could be multiple solutions to go about it but one potential one is detailed below.

1 - Create Two calculated fields in SR BC.FromDate and ToDate of type "DTYPE_DATE". Set the calculated value to "Today()".
2 - Expose these two fields in the Query mode of the Applet. In the Edit Mode hide these controls.
3 - Below piece of code is required for setting up the Search expression and clearing the specs on To Date and From Date.

var sFromDate = this.GetSearchSpec("FromDate");
var sToDate = this.GetSearchSpec("ToDate");
if(sFromDate != "" && sToDate != "")
{
 var sFrSubDate=sFromDate.substring(3,5)+"/"+sFromDate.substring(0,2)+"/"+sFromDate.substring(6,10);
var sToSubDate = sToDate.substring(3,5)+ "/" +sToDate.substring(0,2)+"/"+sToDate.substring(6,10);
var sSearchSpec = "[Created] >= '"+ sFrSubDate+ "' AND [Created] <= '"+ sToSubDate +"'";
this.ClearToQuery();
this.SetSearchExpr(sSearchSpec);
}

This code is generic enough without any error handling. Please add conditions as per your requirement. The basic catch here is we need to clear the FromDate and ToDate specs and build a new expression involving range and any other existing search criteria. Any dates used with SetSearchSpec must use the format
MM/DD/YYYY, regardless of the regional control panel settings of the server or client computer so the date variables should be modified to give proper result.

Happy Crunching!!


Monday, November 21, 2011

Session Management WebServices

This post is for one who has been bamboozled by below interview question.


Question: "Can we have dynamic users for Created By/Updated By fields during upsert operations instead of SADMIN in siebel inbound webservices using standard authentication mechanism? "
Soln: Yes we can, provided we are running a version 8.0.0.4 or higher. Stateless session management siebel authorization is key here in the inbound services.
Below setup is required in order to make this thing work.


1 - SessionAccessService and SiebelUserProfileService - These two webservices should be active and point to correct object manager. They should use sesssion management(i.e WSSOAP = 1) mode. The authentication type for all the methods should be set to None.

2 - Import wsdl and Consume SessionAccessService WS. Make a call to SessionAccess service and obtain the session token for a new Siebel User Session. For this PING method is used. The SessionToken value from the response message represents the unique Session Key that is associated with the newly authenticated and established connection for the SADMIN user. This token will be resused in subsequent requests. 

3 - Import wsdl and Consume SiebelUserProfileService WS. Using the session token obtained in previous step call method "SetContactContext" of the SiebelUserProfileService. In order to maintain context it is critical to pass SessionToken key. We should also pass the input argument "Login Id" of the user 
of which we want to set the context. "SetContactContext" method is added to "SiebelUserProfileService" business service as part of ACR - 385. 

4 - Now once the proper context has been established, upsert call to the desired entity should be made using the original SessionToken Key within the SOAP Header section. check the thin client for the magic as updated by will display the new user login instead of user used to login object manager. 

I hope it helps you make more comfortable when someone asks this question . 

Happy Integration!!