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!!






Tuesday, November 15, 2011

O.C.M. revised


Winter is approaching in this part of world, so is my hibernation mode. For a while Email templates are keeping me busy and some usage of "CreateRequest" and "SendMessage" methods of Outbound Communications Manager business service has forced me to draw a comparison between the two. It may help you to identify which one to go for sending outbound emails.

Below diagram lists out the advantages of both worlds.



There were situations where i felt need of passing parameters to email templates just as we pass parameters to DataMaps, DVM's at runtime. I searched for it without any success. Please feel free to comment if you have any clue about passing parameters to email templates apart from field substitutions or more points to add on above comparison list.


Happy E-mailing!!



Wednesday, October 12, 2011

Tools Crash - Edit Web Layout


They say software upgrade is nothing but a replacement of old bugs with new bugs. so better be prepared when you are going for machine upgrade, a working code may meet dead end. Recently one of my friend upgraded his machine to Windows 7 with IE 9. To our initial delight siebel was working fine but devil 
really lies in details. 
While trying to modify existing applet and view web templates siebel started crashing. Whenever "Edit Web Layout" was clicked siebel stopped working. After some search it was found that because of IE 9 that siebel was crashing. The crash was found to be due to mshtml.dll that is related to the version of the Internet Explorer. Morever it was found that Internet Explorer 9 is not listed as a supported IE version in System Requirements and Supported Platforms document for Siebel Version 8.1 (I know this should have been referred prior installation) but thought of tools crashing cause of IE version never crossed mind. After IE 9 uninstall, tools started working fine perfectly.

Anybody facing a tool crash on edit web layout, make sure you don't have IE 9 installed on your machine. 

Happy crunching!!

Sunday, October 9, 2011

Siebel Mobile Connector

“Be different. Think different. Better to be a pirate than to join the navy.” - Steve Jobs, a great Visionary.

In his quest of paperless and wireless world, Steve has given lot of things which has changed the way we live, we breathe. He blazed through the ever competitive zone of technology and design in a way no one ever thought of. Perhaps no one ever will.

Siebel has also paced up with the changing dynamics providing lot of features enabling customers to create voice & wireless applications with Siebel business content. The Siebel Mobile Connector is a standards-based API that delivers well-formed XML from an optimized Siebel application definition.Third-party applications created with the Siebel Mobile Connector uses standard Web protocols or specific Siebel interfaces such as a Java Data Bean or the COM Data Control to send and retrieve data between users and the Siebel database.

Basic siebel mobile connector architecture works as follow-

1 Using the third-party application’s user interface, the user requests information residing in the Siebel database by executing login commands.
2 The third-party application passes the information requested by the user to Siebel Web Engine (SWE) in the form of an XML document. The request is made through HyperText Transfer Protocol (HTTP), Java Data Bean, COM Data Control or any Siebel object interface.
3 The Siebel Mobile Connector, which is part of the Siebel Server, invokes SWE to retrieve information from the Siebel database.
4 This information is then passed back through Siebel Object Manager to SWE.
5 When SWE has the requested data, it returns it in the form of an XML document to the thirdparty application. If less than the total data set is wanted, the request specifies a style sheet that should be applied to the data. The style sheets are located at the Siebel Server.
6 The third-party application parses the XML document and presents the Siebel data to the user in its own user interface.

More about the siebel mobile connector and SWE commands is available in the bookshelf guide. Dedicating this post to the one who redefined innovation, relaid the limits.

Stay hungry.Stay foolish.R.I.P Steve !!!



Monday, October 3, 2011

B.I.P. Report Error Guide



We have memory , we have google and we have bookshelf but still errors keep coming to spoil evening. Recently while working with BIP reports i ran across with some issues. I have created a trouble shouting guide housing some of the errors which we got while running BIP report from siebel along with resolution.

BIP Reports Troubleshooting Guide

I hope this document helps someone who doesn't have access to support web or working in secure domain where access to external world is prohibited.

Happy Reporting!!!