Archive for July, 2007

Dynamically Show/hide a Control

The browser script Control method ‘SetProperty’ is fairly limited: it only works at all with CheckBox, ComboBox, TextBox and TextAreas, and even with these controls I’ve found behaviour to be flaky. In my experience it’s more reliable to grab a handle to the control and access the DOM properties directly.

For instance, to conditionally show or hide a control using browser script, the code looks like this:

var ctrl = thisApplet.FindActiveXControl("My Control");

if( ctrl != null )


  if( myFlag )"visible";// show control

  else"hidden";// hide control


This approach can also be used to set other display properties – like the font and colors – but you have to be a bit more careful with interactive properties: the standard HTML property disabled does not work the same as Siebel’s Enabled control property, for instance.

The best reference I’ve found to the complete set of DOM properties is on MSDN, with the advantage that everything here should be available to Siebel’s IE-only environment.

July 30, 2007 at 12:51 pm 1 comment

Order of Events

A quick list, for reference:

  • Runtime Applet.PreInvokeMethod
  • Browser Applet_PreInvokeMethod
  • Server WebApplet_PreInvokeMethod
  • Runtime BusComp.PreInvokeMethod
  • Server BusComp_PreInvokeMethod
  • Runtime BusComp.InvokeMethod
  • Server BusComp_InvokeMethod
  • Runtime Applet.InvokeMethod
  • Server WebApplet_InvokeMethod
  • Browser Applet_InvokeMethod

Essentially, the Runtime Event occurs before the equivalent server script event for the same object, plus the Applet browser script events ‘wrap’ all server side events.All of which makes perfect logical sense, but it’s sometimes handy to see it written down in a list.

July 19, 2007 at 10:04 am

Siebel Meetup

Sydneysiders: Andy Simon of Cubic Resources has organised another Siebel-focused drinks tomorrow night, at the Senate BarGPO Sydney. That’s Thursday 18th from 6pm. The short notice means I won’t be able to attend, but hopefully it’s a good turnout. The last evening had a pretty good response and was a great opportunity to meet a few new faces.

Drop Andy a line on ASimon at if you plan on heading down.

July 18, 2007 at 2:08 pm

Custom Popup Applets

Obviously, with every implementation we do we aim to rollout a ‘vanilla’ solution. By now, everyone has fully ‘bought in’ to that mantra and understands the ongoing benefits of not over-customising. Having said that, there are still situations that justify slight, er, tweaks to the Siebel application…

A recent one for me included giving the user a list of options on completing an action. Now, I could get the result I needed by navigating to a new view, but the UI was pretty unfriendly. What I really wanted was a modal popup dialog.

In Siebel 7+ it’s possible to launch a pop-up applet from a normal applet by using the ShowPopup method. Details are in Bookshelf -> Configuring Siebel eBusiness Applications -> Configuring Special Purpose Applets -> Configuring Pop-Up Applets Launched from Applets. To summarise the instructions:

  1. Add a control to your applet
  2. Set the control Method Invoked to ShowPopup
  3. Set the control User Property Popup to the name of your popup applet

The popup applet specified in the user property must use a class derived from CSSSWEFramePopup. To see all possible classes select ‘Class’ in Tools Object Explorer and query for ‘Super Class’ = CSSSWEFramePopup: the standard class for a popup list applet is CSSSWEFrameListPopup. (What if you can’t see Class in the object explorer?) If you’re creating a new applet for your popup and you don’t expect edits in the popup, it’s simplest to configure your layout in ‘Base’ mode.

The popup applet can be based on any business component in currently active business object, and will appear in context. So you could launch a popup from the Orders applet, for instance, and list all child Order Line Items. Alternatively, you can base your popup on a VBC and display any random list of choices you desire. Because it’s all in context, capturing the user action and invoking a change on the launching business component is trivial.

So that’s all good and easy; not even too much customisation. Click a button, up pops our applet. Now, the challenge for any bored configurators out there is this: how do we automagically popup this applet on a new record when it’s written for the first time? Suggestions welcomed in the comments…

July 12, 2007 at 9:19 am 7 comments

Enable Script Assist

Siebel and 7.8.2 introduced a new eScript engine called the ST eScript engine. The engine supports strong typing, which offers performance improvements at the cost of offending some weak-typing-fundamentalists. Even without rewriting script to define your variables, the new engine is supposed to offer performance and scalability advantages over the old T-eScript engine.

More importantly for the day-to-day life of a hard-coding Siebel developer, the new engine (finally!) offers method listing (known elsewhere as ‘typedown’). This is the feature common to all modern IDEs that pops up a list of child methods of a known-type object, so that the poor developer doesn’t have to remember the precise format of ‘PropertySet.InsertChildAt’. One of those little modern innovations that lets developers get on with concentrating on the flow of their script, rather than the irrelevancies of syntax. Now, Siebel’s implementation is hardly Visual Studio IntelliSense, but it’s useful nonetheless.

To switch on method listing, go to View > Options in Tools, then the Scripting tab, and tick the ‘Enable Method Listing’ checkbox: the associated IDE-improvements ‘Enable Auto Complete’, ‘Enable Warnings’ and ‘Deduce Types’ are also worth having. If you can set all these flags then you’re good to go.

If these settings are all disabled, then you’re not using ST eScript engine. This is an enterprise-wide setting that you might have to sell. Details of the whys and hows are on SupportWeb. In brief: for 7.8 & 8, set the System Preference ‘Enable ST Script Engine’ to TRUE, for, change your cfg file to set EnableCLIScripting to TRUE.

July 4, 2007 at 8:32 am 5 comments