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 )
ctrl.style.visibility="visible";// show control
else
ctrl.style.visibility="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.
Add comment July 30, 2007
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.
Add comment July 19, 2007
Siebel Meetup
Sydneysiders: Andy Simon of Cubic Resources has organised another Siebel-focused drinks tomorrow night, at the Senate Bar, GPO 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 cubicresources.com.au if you plan on heading down.
Add comment July 18, 2007
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:
- Add a control to your applet
- Set the control Method Invoked to ShowPopup
- 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…
7 comments July 12, 2007
Enable Script Assist
Siebel 7.7.2.3 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 7.7.2.4, change your cfg file to set EnableCLIScripting to TRUE.
5 comments July 4, 2007
Navigating through the history thread
Quick question: how do you go about navigating ‘back’ or ‘forward’ in a Siebel 7 application?
Quick answer: use the JavaScript history object.
In Siebel 6 there was the ‘GoBack’ method, but that never made the journey across the thin client chasm. I’ve come across a couple of different methods for Siebel 7, but the history object is by far the most robust and reliable. It’s browser script only, because you’re accessing the native JavaScript object, but that drawback is far outweighed by its simplicity.
To navigate back one step in the history, the code might be:
function Applet_PreInvokeMethod (name, inputPropSet)
{if( “GoBack” == name )
{history.go(-1);
return (“CancelOperation”);}
return (“ContinueOperation”);}
1 comment June 26, 2007
More Siebel Web Resources
My referrer links turned up RectifiedSpirit from Stockholm, who links to a Siebel blogger I’d not come across: Graham, a Solution Architect for Oracle Consulting, who promises to write about Siebel and integration ’stuff’. Sounds tailor-made for my current role.
Great to see someone on ‘the inside’ of Oracle writing publicly – although, as clearly disclaimed, independently.
1 comment June 15, 2007
Implicit Joins
In a many-to-many relationship, it’s possible in the child business component to retrieve and set data on the current intersection record through an implicit join to the intersection table. In Siebel 7 you can see an example of this in action in the Opportunity: Contacts view: the Contact has a ‘Role’ on the Opportunity and this is displayed in the list of Contacts. Examining the config in Tools, this role actually sits on the intersection record between the Opportunity and Contact, yet there’s no S_OPTY_CON join defined for Contact. Unlike most joined fields, the UI also allows the Role field to be edited, automatically saving data back to the intersection. The joys of implicit joins.
This behaviour is supported everywhere there’s a many-to-many parent-child relationship. When defining a new field, the Join property is bound to the list of joins defined for the business component. So the trick is to create a basic join to the intersection table – no need to specify a join spec or any details – then you can define your new fields and, when you’re done, delete the join. Siebel will recognise it as an implicit join and pick up data from the intersection record used to retrieve the child.
Add comment June 14, 2007
URL Controls
There are a couple of options to display a hyperlink to an external site from Siebel 7. The simplest is to set the following properties on an applet control:
- HTML Type: URL
- HTML Display Mode: EncodeData
This will URL-encode the field and wrap it in an HTML link tag <a></a>. As long as your field contains a valid URL, you’ll have a working hyperlink. In the high-interactivity client the URL will by default open in a new browser window; to support the same behaviour in the standard interactivity client, set:
- HTML Attributes: target=’_blank’
This approach doesn’t allow you to change the link title, however, so if it’s a big ugly URL you’ll have a big ugly field displayed in your applet. As an alternative, you can hand-code the hyperlink. Set the calculated value on your field as follows:
“<a href=’http://yourURL.com/yourtargetpage.html‘ target=_blank>Your Link Text</a>”
(Note the enclosing double-quotes.) Then set up your applet control:
- HTML Type: Field
- HTML Display Mode: DontEncodeData
- Runtime: Y
This tells the Siebel UI to interpret the contents of the field as raw HTML – so you see your hyperlink exactly as constructed.
1 comment June 5, 2007
Sydney Siebel Meetup
For any Sydneysiders reading, Andy Simon of Cubic Resources has organised drinks for Siebel-types next Thursday. In his own words:
I specialise in the recruitment of Oracle Siebel CRM professionals for Cubic resources and intend once a month to hold a networking evening here in Sydney. The first of these will be held at the following address on Thursday 7th June at the – we have the bar from 5pm until Midnight.
Senate Bar
GPO Sydney
1 Martin Place
SydneyThe reason for these evenings are for me to get to know everyone within the Siebel market so that I become a definite specialist within the Siebel Arena. I feel that best way to get to know people would be to do it in an informal relaxed environment.
There will be a tab set up behind the bar so that the first 2 or 3 beers will be for free.
The capacity of the Senate Bar is limited, so if you plan to attend then drop Andy a line on ASimon at cubicresources.com.au.
My personal view is that anything that help foster a better local community around Siebel is to be encouraged. Compared with other similar-sized technology specialisations, Siebel has always lacked somewhat in peer support structures.
Plus, there’s free beer…!
Add comment May 30, 2007