רשומות

מוצגים פוסטים עם התווית Crunchers

Authentication Business Service

Most people want security in this world. So whatever piece you design, Authentication becomes the key aspect. There are times when you want to authenticate whether the user-in-context is valid siebel user or not without actually logging into the system. This type of requirement is typical in Mobile Solutions using HTML5 and siebel webservices. Here I unearth one more hidden gem of siebel, " Authentication Business Service ". This magical service authenticates user against siebel irrespective of your security authentication mechanism. Be it database or LDAP it will return you valid siebel user name else invalid user/password error.The method is " Authenticate ".  It accepts three input parameters: 1 - User Name - User Name to be authenticated in siebel 2 - Password - Password of the user 3 - GetPrivateCredentials - Y OR N based on the requirement.  If set to Y it will result user name in "Siebel User Name" output parameter. One can see its usage in " L...

Multiple File Attachments

תמונה
Necessity is mother of taking chances. In recent outrage by our business users, we were asked to provide option of selecting multiple file attachments. Unfortunately siebel doesn't provide option of creating multiple attachment in one go. Even drag and drop in High interactivity creates only one attachment. With Open UI there are options but with good old HI and SI mode this can be real tricky. However, With mix of HTML-Javascript-browserscript we were able to achieve a custom built html file with multiple file browse options. where user could select three files in one go. Below custom file browse HTML was used . Name is as "MultiFileAttach.htm". File1 File2 File3 Once the HTML page is ready, copy it in  Siebel\Client\PUBLIC\Enu and \siebsrvr\WEBMASTER\enu folders. I was not able to use Multiple attribute for file input type (food for thought for Javascript masters) so was forced to use three different file controls. The key here is returnValue property which returns the...

UIF Calendar Control in MVG Applet

תמונה
Recently while working on multilingual application we faced strange issue. While setting values in MVG applet with calendar control, any date value was getting appended with UIF_ string. As a result invalid format error was coming. Eagle-eye pursuit resulted in the fact that even on the calendar control the month was like "UIF_May". To our surprise this issue was not happening on all machines. It was occurring only in some of the user machines with specific configuration. On discussion with Oracle it is found to be product defect.                                                             With configuration of Windows 7 and IE 8, it happens in ARA/ENU/FRA implementations. In order to resolve the issue IE 8 must be updated to latest patches from Microsoft or as an alternate solution could be: 1. In the Internet Explorer browser, ...

Standard Interactivity or High Interactivity

With winters approaching hibernation starts and efficiency dips (even though its below par through out the year). But still issues never stop. Recently while working on standard interactivity portal we have written script on BC which was used in both HI as well as SI application. However typical business requirement forced us that this piece should be executed only on SI mode of the application and not on the HI mode. The real trick here is to identify in which mode of application you are working on. With some support from Google we were able to find its-another-mystery-service-type business service which is used extensively but less talked about. " Web Engine State Properties " is the magic service here. Below piece of code can help you find the mode. var sInputs = TheApplication().NewPropertySet(); var sOutputs = TheApplication().NewPropertySet(); TheApplication().GetService("Web Engine State Properties").InvokeMethod("IsHighInteractive",sInputs,sOutputs...

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

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

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: PastSR...

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 popula...

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

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 - I...

Disabling button in SI Mode

Working with SI applications can be as good as playing with fire. Recently we faced an issue when some naughty users clicked button multiple times resulting in underline action getting executed multiple times. As in case of SI applications, if the method is taking time to execute then button is not disabled it remains active giving end user an impression of nothing-is-happening. So user may end up clicking the button multiple times. The only way to prevent multiple clicks is to disable button as soon as it is clicked. Fortunately there is an article on support which provides solution to achieve the desired but a scripted one. Following piece of code can be used to disable button after click. function WebApplet_ShowControl (ControlName, Property, Mode, &HTML) {     if(ControlName == "SubmitButton")     {       if(Property == "FormattedHtml")       {           var index = HTML.indexOf("onclick...

Distinct Property

תמונה
Distinct clause is one of the powerful clause in SQL which helps to remove duplicates from the result set. In real time scenarios we are bound to have requirements which involves updates or removal of distinct records. Siebel provides a,how-i-missed-type, "Distinct" property on business components that helps us to achieve just this. Business components in siebel 7.8 and higher have this property. Setting this property to TRUE allows the equivalent of a select distinct query as it suppresses system fields.This property enforces a "DISTINCT" clause on all fields present in the BC, which may lead to errors during execution. It is better to clone business component and include only fields which are required in distinct clause. Document ID 867149.1 in support web explains this siebel virtue in detail. Happy Crunching!!

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 a...

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 sFrSu...

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, tool...

Different Query Mode in Edit List

I crunched one. This post is an addendum to one of my previous "Food for Thought" post where the main challenge was to display different columns in Query Mode when applet is displayed in Edit List Mode. with some configuration-Scripting-Luck i am able to achieve this scenario. The key ingredient here is the usage of Dynamic Toggle. Following necessary steps are required to achieve desired solution. 1 - Create a clone of the list applet which should be displayed in Query Mode. Remove unnecessary Columns which are not required to be displayed while querying. Consider two applets are: a) SR List Applet b) SR Query List Applet 2 - Make the "SR Query List Applet" as the default applet to be displayed in the view. 3 - Create a calculated field in the Service Request BC with following values: Name: QueryCalc Value: IIF(GetProfileAttr('QueryMe') = 'Y','Y','N') 4 - Now create a dynamic toggle in the "SR Query List Applet". Set the ...

Popup visibility - Division Based

It is very critical that one should have appropriate access to information available. Thus siebel has given comprehensive access control mechanism which helps in restricting data visibility. We can have visibility filter at multiple levels including View, Business Component, Picklists, Drilldowns, Links . However the modes which we can set is restricted to following values: All Personal Sales Rep Manager Organization Sub Organization Group Catalog Recently i was asked to have a visibility control based on the Division during the assignment of Service Request. One should see employees related to his division only when he opens employee pick applet. We opted for Personalization to implement this as it gives a flexibility to change the filter dynamically without any srf change. Steps required are: 1 - Set the Popup Visibility Type to "All" for employee buscomp. (Please check before doing this as this will impact all Picklists based on Employee BC) 2 - Create a Personalization ...

Cursor Modes for ExecuteQuery

תמונה
Ignorance is bliss.A lot has been written about the cursor modes when using ExecuteQuery method. As a general rule by birth we are told, when using the ExecuteQuery method in scripting, the recommended cursor mode is ForwardOnly if there is no need to step backward through the result set. But ForwardOnly cursor mode should not be used in a user interface context, for example, when the business component being queried is displayed within an applet of the current view. I was victim of this ignorance. We had a requirement of querying on the EBC based on the query spec we get from other applet in the view. I have added ForwardOnly mode in the executequery method and to my horror query results were always returning only one record in the applet. Turning on the ForwardBackword cursor mode in the ExecuteQuery method fixed this isssue. The issue was When accessing database records with a cursor mode of ForwardOnly, only one record at a time is retrieved and kept within the Siebel Object Manage...

S_SRM_TASK_HIST Table

One of my admin friend once told me that the problem with troubleshooting is that trouble shoots back. In my on going quest for controlling multiple Login-Logout sessions in Directory authentication environment i landed up in situation where we required to know the list of naughty users who are working in multiple sessions. Instead of shooting back to admin friend i thought lets-hit-google and really found something worth sharing. Issue: We set Flag on Login and unset the same on Logout in order to determine availability for assignment purpose. In multiple login/logout scenario this approach fails. We have to maintain the exact status of Employee in order for correct assignments. Solution: This could be accomplished in two ways. First option is, We can have batch script which executes command to list the number of sessions currently logged in each application server. List Active sessions for comp PsCcObjMgr_enu show SV_NAME,CC_ALIAS,OM_LOGIN Above command will list the active sessions....

Hierarchy Extraction ++

תמונה
This is an extension to my previous post regarding Hierarchy Extraction which compares different ways to extract property sets. I have quoted in the earlier post regarding the length limitation(75 characters) of Workflow Utilities echo method using dot notation. But Siebel never run out of altervatives and each one gives me something different. In order to overcome the length limitation of the dot notation one can make use of "Aliases" which lasts upto 255 characters. Workflow Processes can have Process Properties of type "Alias" (ignorant me). Basically this data type acts as a pointer to a specific attribute inside a Property Set. So in order to fetch Sr Number or Account Id, mentioned in previous post, we have to define two process properties of data type "Alias" with Default value as below SR Number: SiebelMessage/ListOfService/Service Request/@SR Number Activity Id: SiebelMessage/ListOfService/Service Request/ListOfAction/Action/@Activity Id In the w...