Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Siebel system field bug

This was an interesting find by colleage PW, which will surely affect a lot of developers.

The bug? goto any applet, create a control or column, and try to map it to a system field eg. Id, Created, Created By. You'll find that the field dropdown is now a bounded picklist, and will reject your system field.

I dont remember this feature in 8.1.1 or any prior versions of Siebel, it must be a special. You used to be able to type in any field name you want, and compile the applet with no errors (unless you validated the applet).

If the field didnt exist, all that would happen is the field will appear blank on the UI, which is pretty harmless, so its quite a mystery why Siebel made this bounded.

Here is a simple trick that will allow you to workaround this behaviour, without modifying the tools SRF.

First create your system field in the BC (just supply the name), go back to your applet, map the control/column to your field, which will now appear in the picklist, compile and test your applet, then go back to your BC and delete/inactivate that field.

Ultra browser script generator

This tool hardly needs an introduction; I'm talking about Siebel's "Genbscript.exe", which is a simple command line tool that allows us to generate browser scripts for our application. This is an indespensible tool for every developer and environment specialist.

A generic implementation is shown below

genbscript.exe <your config file> <browser script output directory> <language>

The problem with the above method is if there is an existing directory, genbscript.exe will not run, unless you first delete the existing directory.

When this happens you have to goto the browser script folder..

Find the duplicate folder among all the previous versions of the browser script directory, and delete it, which is more frustrating than it sounds.

Genbscript.exe is a black box command line utility, which has no visible hooks, but never to be one, to settle for standard features, i created some automation that got around the limitations of this tool.

I really had to stretch my batch scripting muscles to its limits for this exercise.

The result is "Ultra GenB", which is an enhanced batch program that will detect wether you've got a previous version of the browser script folder, deletes the folder in question, and, regenerates your browser scripts, all with 1 click.

There are only 3 parameters that you need to set.

SET BSCRIPT_EXE=<Siebel folder>\Client\BIN\genbscript.exe
SET CFG_FILE=<Config file>.cfg
SET OUTPUT_DIR=<Siebel folder>\Client\PUBLIC\enu

I spent a whole day, just generating browser scripts over and over, so i guarantee your inner geek will have endless hours of fun with this tool.

The tool is free and is provided without any warranty, and can be downloaded from my LinkedIn Group: Impossible Siebel

Does anyone want to see a progress screen that actually shows you the working progress, and not just a blinking cursor?

ImposSiebel 1st Bday

Its hard to believe that it was exactly 1 year ago, that Impossible Siebel came onto the blogasphere.

What makes an already busy professional decide to spend time with an audience of total strangers?

Most of us start off our career by learning from others, so i think it is appropriate that we give this knowledge back to the community. As my master once said to me, Grasshopper, when your cup is full, you need to empty it, before you can drink more.

There are some great Siebel CRM Blogs out there, Neel from Siebel Unleashed was a pioneer in the Siebel blogging world and still provides the Siebel community with a comprehensive resource of really useful technical advise for beginners and experts a like.

@lex from Siebel Essentials, the tweeting trainer from Oracle is the guru on everything on Oracle CRM and BI. He's also damn quick on answering questions, something for all of us to aspire to.

Other notable mentions are Geeks Blogging, Siebel Mantra, Siebel Developer, Siebel Guide, Siebel Tips.

These are all great resources, so what what did i have to offer?

The concept was quite simple, go through Support web, bookshelf and find things that were said to be impossible, or pick on Siebel defects and turn it around in favour of the customer, plus promote german 80s pop music.

This is a very strict niche, if people put up with the german music, but life is dull when you dont have a cause.

So where do Impossible Siebel Readers come from? here are some interesting analytics.

[Visitor Country]

60% of users are American. Good to see the Germans are in there as well.

[Visitor City]

4 out of the top 5 visitor cities are from India.

[Corporate Visitors]

Nope, i dont work for any of these companies...

[Most Popular Articles]

1: ImposSiebel Toolbar Beta
2: How to create a VBC without Script - XML Gateway
3: A Siebel eScript framework
4: Reader Challenge - Display a popup applet from inside a Shuttle Applet
5: Introduction to the ABS Framework

You may have noticed that impossible articles have slowed down in the last few months, this is due to new hobby in gardening (plus a little bit of professional commitment), which has taken its toll on the website, but I'll update my twitter more often to compensate.

I'm always working behind the scenes and for those who care, the ImposSiebel Genbscript will be released within two weeks and the regular articles will continue after that.

Finally what would an anniversary be without some german pop music?

This number comes from Patty Ryan, unquestionably her greatest hit. Its got that great 80s sound, and signature euro beat.

View last modified log file

Does this look familiar? The good old directory full of log files in your face.

If you spend a lot of time sifting & sorting through log files to find the last modified file for inspection, then this tip might make your day.

I've been searching for a program, that has the following features

* Automatically open the last modified file in a directory
* Provide custom code highlighting
* Real time log viewing
* Cost nothing

Unfortunately, i could not find such a program, but when i was about to give up, i thought of a cheap trick.

I can write a batch file that parses a directory for the last modified file, and open it using my favourite editor/viewer.

Heres how we can achieve it.

Create a batch file with the following contents

@echo off
for /f "tokens=* delims= " %%a in ('dir /b /o:-d C:\Temp\*.log') do (
baretail.exe %%a
goto :eof

Log directory: C:\Temp\
Log file extention: *.log
dir /b: filename only listing
/o:-d: orders by date descending
log viewer: baretail.exe

I know you can just keep a explorer window open, sort your files by date, click refresh, and double click your file, but thats about 4 clicks, including the click to find your window when it loses focus.

Create this shortcut in your taskbar, and you can do it with 1 click, and at the same time, your desk space will be less cluttered, and more memory friendly.

Note: Baretail, is a free real time log viewer that allows custom highlighting. Although it is not freeware, it is a lite version which does not expire.

Results of ImposSiebel Toolbar poll

The results are surprising, and shows that readers are heavily divided on two features.

The winner of course is the field/column/table information, users who voted for this option are practical, they want fast access to their configuration without messing about in Tools.

What is surprising to me, is the number of people who voted on Browser Script tracing. It might just be my reader demographics, because on most projects, Browser Script is avoided, and given in for Server script solutions.

Although its use should be minimized, its fair to say that Browser Script functionality offers really cool functionality for end users, that cannot be achieved using Server script. People who voted for this, are likely to be flashy, and sacrifice practicality for a little luxury.

I have prototyped both features, but can only focus on one, because both require a lot of work (my spare time).

But as a consolation prize for the code junkies out there, i'll dedicate a couple of articles on some obscure Browser Script behaviour and tips for rapid development.

The new feature will be available in a few weeks (maybe less), so keep an eye on ImposSiebel twitter for updates on the next IS Toolbar version.

About View in Standard Interactivity - Part 2

In the previous article, we discovered a hidden object called SWEApplets, that provides us access to the rendered Siebel view.

We will learn how to utilise these objects to create funky developer tools, that will make your colleagues envious =)

To begin with, we need our tool to be as portable as possible, it has to work in any environment without requiring changes to the respository, srf, template files or environment.

We can do this, by hooking into the current Siebel session, and injecting our own code that interacts with these objects.

This can be achieved by typing typing javascript statement in the address bar of your browser, such as

javascript: alert( top.SWEApplets[0].ViewName );

Remember this particular object only responds correctly in SI, but you can still try it in HI.

The above technique is useful for simple discovery of objects, but for more advanced requirements, we can write our logic in an external file and inject the file into our session, by using a bookmarklet.

Now create your js file, and put the following line of code in it

alert( top.SWEApplets[0].ViewName );

You can put this file anywhere, in your C drive, in your Siebel web directory, or on an external website. For local development, i like to put my file outside the Siebel web directory, so it doesnt get cached by the browser.

The next command allows us to inject this external file, and run all its contents in our browser session.

To use this, create a Favourite, and paste the following code into the URL of the bookmarket.

javascript:if(document.getElementById('fs') != null){document.getElementById('fs').removeNode(true);};

Now with the basics out of the way, we can write any standard javascript, and this will be executed on the fly in the browser.

To get About View SI as promised, put the following code in your external file

var sView = "";

if (SWEApplets.length > 0) {
sView += "[ViewName]
sView += SWEApplets[0].ViewName + "

sView += "[Applets]

for ( var i = 0; i < SWEApplets.length; i++)
if ( CurrentAppletIndex == i )
sView += " * " ;
sView += SWEApplets[i].Name + "
" ;

if (PopupAppletName != "")
sView += "
[Last Popup]
sView += PopupAppletName;

alert( sView );

What we've done is iterate through the SWEApplets array, and construct our desired output using the values from the objects methods.

Notice that, we prefix the currently selected applet with a nice little "*". If you have 10 applets in a view, this quickly tells you which applet you are looking at.

There are better ways of displaying this information, and the alert will be annoying to some, but how you want to display this, is limited by your creativity

Its only taken us 5 minutes to build this developer tool, but the tricky part is discovering all the available objects.

If you are bored, you can find this information in the Siebel browser framework files in the public\files\ folder.

Siebel engineers will have access to internal information about these objects, but for people outside looking in, it may seem very cryptic. Not every object is useful or an object could be useful but without knowing what it does, it is infact useless, and not every useful object is easily discoverable.

The basis of most of my hacks rely on injecting javascript into the current Siebel session, although this tool only works in SI, the same technique can be used for HI, you just need to know which objects to access.

In closing, its important to note that, neither Siebel nor myself, recommend the referencing of these objects in the repository or web templates.

These objects belong to the Siebel browser framework, and can change at any time (Yes, this really happens =).

Any use of these objects will not be supported by Siebel, they are undocumented for a reason!

About View in Standard Interactivity - Part 1

The above title might seem like an oxymoron to all those experienced Siebel Standard Interactivity developers out there, but its true, there is something sadly missing in SI. I recently had my first taste of a SI application, since Siebel 6 Dotcom, and my first question was...

Wheres about view?

I wanted to know what view i was on, and what applet i was looking at.

I thought someone had customized the application and removed this option, and then i heard a snicker in the background. One of the seasoned SI developers responded, saying "everyone asks this question!", and provided me with the technique.

    How to find the Applet name
  1. Right click on the View and select 'View Source'
  2. Goto the bottom of the HTML source and start scrolling up
  3. You will see a list of applet names in reverse order

    How to find the View name
  4. Scroll up a little further and you will see the view name

This trick was provided by Siebel Expert Services, and although it works, you still have to hunt for the names.

Imagine using this method on a monday morning! I know this can be useful in HI for finding the name of a popup applet, but it is quite cumbersome and repetitive.

In summary, you dont have the luxury of About View in SI...

So what if i said, i can give you About View in SI + more than you bargained for? Welcome to Impossible Siebel.

The technique that i'm going to show, relies on accessing hidden objects in the Siebel frames. I mentioned this in passing in my first article about the Siebel HTML structure, and gave a clue to an undocumented interface, but to stay on track for this topic, we're going to look at the SWEApplets object and its related properties.

The SWEApplets objects is an array that contains all the rendered applets in the Siebel UI, and by accessing this object, we can discover useful information about our current view.

Name: Name of Applet
ViewName: Name of Applet's View

This property tells us which applet in the above array is selected by the user, usually it means the highlighted applet. For home pages, you can still click on an applet, and it will not be highlighted, but you can still get the current index.

This property contains the name of the last popup applet that was displayed.

Armed with the above information, we can construct the following program in < 5 minutes that displays About View information for us in SI.

For those who have never used SI, you can still follow this tutorial, because there are some common fundamentals worth knowing, that apply to both SI and HI.

There is enough information here, for the creative Siebel developer to pick up and implement, but for the law abiding Siebel citizens other there, stay tuned for the next episode to see the actual implementation...

Pop up window for dual screen computers from 8 +

In one of my recent articles, i gave a tip on how to make pop up windows display on the same screen as the browser window in Siebel 7.

Those people, who have 2 or more monitors, will understand this problem very well, but this trick no longer works in Siebel 8. After searching on ML without any luck, I started to do some trial and error.

The Siebel 8 client config file dosnt have a [SWE] section, and creating this section with the value PopupSizeConstrained = TRUE, dosnt do anything.

Neither does creating an Application user property with the same parameters under the Application object, but if we move it under the [InfraUIFramework] section, it should start working again!

PopupSizeConstrained = TRUE

This has been tested in Siebel in 8.1.1.

Pop up window for dual screen computers from 7.5.3 +

There is a little known trick that is documented in ML (Siebel CRM Fix Pack Guide, version 7.5.3 [Doc ID 546998.1]).

It is so useful and yet so sad that many people are living without it. For people with dual monitors, when you open up a popup, it appears only on the primary monitor.

For example, if you have your Siebel client on the secondary monitor and click on a popup applet, it opens in the primary monitor, to me thats almost half way round the other side of the world.

This is pretty unforgivable, and yet people just accept it as a fact of life, but there has been a fix for this since 7.5.3.

Who really looks through all the Oracle/Siebel fix documentation? Not until we are really annoyed with the behaviour.

The fix is simple, put the following line under the [SWE] section of your config file

PopupSizeConstrained = TRUE

Now like some sort of magic, all your popup windows will appear on the same monitor that your Siebel client is located.

Exporting different objects into one SIF

As a developer, we sometimes need to retrofit changes from one environment into another.

Siffing is dangerous and some projects have banned this practice because the likelyhood of inadvertantly overwriting someoneone elses work.

Reimplementing is safer and recommended, but there are times when you want to SIF.

Heres a tip that allows you to SIF out different objects into one SIF file.

Its easy to SIF out multiple objects of the same type, but if you have objects that lie in different parts of the explorer tree, you cannot do a group selection.

For example, if you have an applet and BC that you want to export, you can combine this into one file very easily, by performing the following process.

1. Find the first object that you want to export, and select 'Add to Archive'
Applet: ACD Transfer Call Applet

2. Leave the Archive window open, and move it out of the way. It will stay modal, but still allow you access to your explorer.

3. Find the second object that you want to Archive, and select again 'Add to Archive'
BC: AICC SCORM Import Course

4. Click Save, and Siebel combines all those object definitions into one SIF file.

Now you can import this SIF back into another repository. This is really useful, and a lot safer than doing project imports.

This is really simple, and potentially obvious to a lot of people, and would not normally meet the criteria to be posted here, so I asked some of the most senior people around me, if they could do this but was told it can't be done.

Impossible Solutions Poll Results

At Impossible Siebel, we try to provide creative solutions to seemingly imposible tasks in Siebel.

You wont find instructions on how to build/debug workflows, or how to use try/catch statements or other basic how to's, but you will find obscure and different ways of solving Siebel challenges.

I thought about the 4 most interesting problems with Siebel, and offered readers a chance to give their feedback.

If you need a refresh on the original challenges, you can find them here.

The votes have been counted, and it is a land slide victory for VBC without scripting.

I personally had my bets on enabling/disabling multiple showPopups, but the results were obvious from the beginning, people want to know how to create a VBC without using scripting.

I will write solutions for the 1st and 2nd place winners in the poll, and if there is enough interest from readers on the seeing the other solutions, i will publish those in the future.

As a prelude to the solution on a creating a VBC without scripting. There are actually two completely different solutions for this challenge, each with its own pros and cons.

We'll jump right into this one, just hold your breath for a minute...

Impossible Solutions Poll

I've started a new poll on the website, to see which topics readers had the most interests in.

The 4 options are

  1. Create a VBC without scripting
    This is unusual and widely unknown, but it is not impossible.

    Most people would like to reduce scripting in their lives, and VBCs were traditionally a declarative free zone. It was like Siebel developed it only for the geeks, but i think its time the non geeks got in on the fun as well.

  2. Create a MVG on a VBC
    In bookshelf, it states "VBCs cannot contain a multi-value group (MVG)". This does seem impossible... but not for the creative developer.

    Although, most developers wont touch VBCs in their lives, but for those who do, its unimaginable that Siebel didnt provide a vanilla way of doing this.

  3. Selectively Enable/Disable multiple ShowPopup buttons
    On an applet you have two buttons, one pops up an organizations list, and the other a contacts list.

    Siebel PreCanInvoke is used to Enable/Disable buttons based on their methods, but when you have multiple buttons based on the same method, it is not possible to selectively enable/disable it...

    or is it...?

  4. Show a tooltip on a button MouseOver
    This is one of the worse usability problems of Siebel. It is frustrating when you see an applet and have no idea why a button is disabled.

    Wouldn't it be nice to display a nice message to the user when the user hovers over the button? But according to the documentation, MouseOver is not supported in HI.

    Use the documentation as a guide, because there are various solutions to this problem.

Maybe the above 4 solutions dont interest you, the comments are open for you to request solutions to your own impossible problems, or are you waiting on the conclusion to an article, put in your requests for these as well, so i know where to concentrate my efforts.

Auto login into iSQL

Sometimes its the little things that make a big difference in life, i see a lot of people tediously entering all the connection details each time they want to log into their local database.

The following shortcut will allow you to log into the local database automatically.

C:\<Siebel directory>\Tools\BIN\dbisqlc.exe -c
"uid=SIEBEL;dbf=C:\<Siebel directory>\Tools\LOCAL\sse_data.dbf;pwd=<your password>"

In some projects, system policy forces us to change our server passwords every 45 days, even for development environments, which means our passwords will be out of sync with the local database.

This causes all sorts of issues, the most annoying is being locked out of the database. When the local database tries to connect with the old password, this is the counted as the first failed attempt, if you enter in an incorrect password, this is the second attempt, and when you try to connect again, the local still uses the incorrect password, causing you to fail authentication 3 times, when you only had 1 try.

To change the local database password, issue the following commands.

--Change password
grant connect to <USERNAME> identified by <PASSWORD>;
grant connect to SIEBEL identified by <PASSWORD>;


Remember to also change your auto login script, you can get around this task by using the DBA login, but then you have to prefix all your table references with SIEBEL when typing your statements, its a compromise either way.