Thursday, July 12, 2012

Illusion in Standard Interactivity


Whenever I am asked to work on siebel standard interactivity it feels like harry potter stranded in those wild mazes. But i can tell you if you play in Java/HTML you can really unearth hidden gems in SI application. Recenty while working on Siebel eSales portal we were asked to implement typical requirement to control button's visibility conditionally. 

For the Open status button should be visible on list applet and for other status values it should be hidden. Once again "WebApplet_ShowControl" server event is critical to its implementation as other browser events of applet are not supported in SI architecture. The idea is to modify the HTML generated at run time to achieve conditional visibility. Below steps are required for ultimate illusion.


1 - In the HTML attribute of the Button Control which we want to make conditionally visible add below property
style='visibility:hidden'
By default button will be hidden and we will only make it visible when status is Open.


2 - Below piece of script is required at "WebApplet_ShowControl" event on the server side of applet.
if ((ControlName == "Test") && (Property == "FormattedHtml"))
 {
var a = HTML.indexOf("visibility");
var b = HTML.indexOf("'",a+1);
if ((a > -1) && (b > -1))
{
var sr = this.BusComp().GetFieldValue("Status");
if(sr=="Open")
var t = "visibility:visible'";
else
var t = "visibility:hidden'";

var HTML2 = HTML.substr(0,a) + t + HTML.substr(b+1);
HTML = HTML2; // Re-Generating HTMLs
  }
 }
Here we are just checking the status value and modifying the generated HTML at run time to make button dynamically visible.





If in first attempt it doesn't work don't get mad at me just clear the cache and watch out for magic. Bet me you will feel like wathcing The Prestige again.

Happy Summers!!




Thursday, June 7, 2012

User Keys & Blind Insert

If ignorance is bliss, why aren't there more happy developers?


Recently I found something strange in our inbound integration. For Upsert scenario we received XML data in all Upper Case format. Despite having CaseInsensitive setting set to TRUE for EAI Object Manager the integration was failing. It was because of the fact that user keys are always case sensitive irrespective of setting at OM level.

As a workaround for this we can either use "Force Case" field property at BC level or we can have numeric user keys. 

Another interesting user property we came across insert unique-user-key scenario is "SuppressQueryOnInsert" at IC level to do blind insert. This is real performance boost in scenarios when you are sure incoming user keys will always be unique. Without this user property Siebel first generates SELECT statement which queries for the record with given user key across the table. This user property helps in suppressing this SELECT statement and thus improves the performance by some mile.

Happy Integration!!

Tuesday, May 22, 2012

Thread Bar Updation


Sometimes Simplicity just does not precede complexity, but follows it. Recently while configuring Thread Bar for some views, we faced a trivial issue. Value of the Thread Field defined was not coming in the Thread bar.  We have specified the correct Thread Applet, Thread Field and Thread Title properties for the related views but only Thread Title was being displayed when we drilldown from List view to Form View. Google resulted this issue being faced by other users without fix.
Things got luckier for me when i found a similar article on support web which stated that this is the intended behavior of siebel when the underlying Business Objects of traversing views are same. However as workaround of this issue there are three options:

  1. Have different BO's for List View and Destination View.
  2. Remove thread bar and make use of IE back option.
  3. If it is business critical to have navigation path in thread bar then one can define Source Field and Destination Field in the drilldown from list View to form view. This setting of source field in the drilldown causes Thread Field to be displayed in the Thread Bar. However it comes with its own inherent issue in a way that user can't traverse through record set in Form view. 
Hope this post helps you while configuring thread bar and keeping business object context in mind. Yup simplicity follows complexity.

Happy Configuration!!

Monday, April 9, 2012

Validation Utility Service


Many  times we have wished that workflows could have ActiveViewName function so that we can perform actions based on the current view. For long i have been resolving this by using profile attributes in workflow but GetProfileAttr('ActiveViewName') is not bullet proof, as when we do Reload/Refresh profile attribute it clears out this profile attribute.



In our quest to overcome profile attribute usage, we discovered another siebel gem, rarely talked,business service "Validation Utility Service". This business service contains a method "GetActiveView" which returns active view name. One can directly use this business service in workflow and can get name of active view.

While writing this piece i also came across another siebel blog which talks about fetching active view details using different business service. Hope either of business service helps your cause.

Happy Crunching!!



Monday, April 2, 2012

Reload Profile Attributes


There are times one has to wear multiple hats as part of job, definitely a mandate if you are married. Sometimes a Manager has to work as team lead or vice versa.

Typically such scenarios are easily handled in siebel using "Change Position" concept. However trouble starts when you have used persistent profile attributes in the search scenarios which fails when user opts for changing position specially if search is based on profile attributes like Job Title, Position Type.

Recently we faced similar scenarios as one of the user had two roles. We used "Division Name" profile attribute to display list of employees while picking SR owner. Trouble started when user did change position and for the other position intended list of employee was not coming. Division Name profile attribute is available in personalization profile BC using join and loaded in session when user logged in. The issue is profile attributes doesn't refresh when you do change position. Even a call to "LoadUserAttributes" method after "Change Position" failed to refresh this attribute.

However one cool thing this method does is it returns correct output for DivisionName function. It doesn't refresh other profile attributes which are pulled from joins but it reloads calculated profile attributes based on functions like PositionName, DivisionName and OrganizationName. This was good for us as we based the profile attribute on DivisionName() function and bingo, the resultant set of employees was perfect.  Hope it helps if you are struggling with similar scenario or planning to use profile attributes in search conditions.

Awaiting some alternate tips in order to refresh profile attributes.

Happy Reloading!!

Thursday, March 22, 2012

HTML content in BIP Report

This is war-cry for all BIP gladiators.

Recently while working with BIP reports we hit a road block in displaying HTML content. We need to display a control in BIP report with proper HTML formatting but however when report is rendered it displays HTML tag as is without formatting. The data input is RTCEmbedded control in siebel which saves data encapsulated in HTML tags but instead of transformation those tags are displayed in BIP report as normal text. We tried with integration approach as well as SQL query based reporting architecture but of no luck.

From Tim's blog we got an idea of XSLFO format but it is of not much help as while retrieving the content from database BIP engine process data as & l t; instead of proper HTML < or > tags i.e. they are not escaped. I have already tried below options to fail.

  •  Escaping <,> to its ascii equivalent in sql
  •  Using clob/Nclob column to store data
As a stop gap solution we are currently chopping HTML tags from the data using XSL and displaying content in a plain format. Any jail break on this trivial issue is most welcome. 

Happy Reporting!!



Wednesday, March 7, 2012

RTCEmbedded Control

"When the solution is simple, God is answering"- Albert Einstein

Recently we were asked to implement a embedded text editor in a control which could facilitate user for text formatting including features such as bold, italic,font, color etc.  The first reaction was can-we-do-it types with nothing popping in mind (Yeah, thought of Email Templates view never occurred ).But with some help of support web solution turned out to be much much simpler.

We can achieve this by using control of type "RTCEmbedded". This control type provides an embedded text editor which supports below html tag:
  • Bold < STRONG>
  • italic <EM>
  • Underline <U>
  • Ordered list <OL>
  • List items <LI>
  • <P>
  • <FONT>
  • <BLOCKQUOTE >


However there are certain caveats while using this type:
1 - Control doesn't turn out grey in case of read only conditions.
2 - Throws an error when reaching field length and clears out everything forcing user to renter everything.
3 - It is not currently possible to paste text and graphics (such as graph or image) within such controls.
4 - We can't use this column directly in SQL based reporting purpose without appropriate parsing.

Happy Crunching!!