May 29, 2015

Configure Show More/Show Less buttons on custom List Applets

We have seen lot of out-of-the-box Siebel list applets with Show More/Show Less button which is placed at top right corner. In a recent implementation I had to do the same thing on custom Siebel List Applets. Here is how I did it.

1) Create a Control in your list applet with the below properties:

Name: ToggleListRowCount
Caption: ToggleListRowCount
HTML Bitmap: BTTNS_MORE
HTML Display Mode: EncodeData
HTML Icon Map: ToggleListRowCount
HTML Type: Link
Method Invoked: ToggleListRowCount

2) Edit the Web Layout and place this control at the end in the buttons bar.

3) Compile your changes.



April 9, 2015

List of Values - Clear Cache using eScript

There are 2 ways we can do Clear Cache using eScript:

1) By invoking method "ClearLOVCache" of "List Of Values" BC

  • This method can be used with button controls on any applet based on BC "List Of Values", since this method is available under the business component "List Of Values".

  • This method can also be invoked from other Applet, BC, BS scripts by using below code. 
    var oBO = TheApplication().GetBusObject("List Of Values");
    var oBC = oBO.GetBusComp("List Of Values");
    oBC.InvokeMethod("ClearLOVCache");


2) By using OOTB Business Service (Undocumented)

  • Business Service Details
    • BS Name: LOV Cache Clear Service
    • Method: Activate (This method does not require any input arguments which is logical)

  • Code sample below:
    var bsSvc = TheApplication().GetService("LOV Cache Clear Service");
    var psIn = TheApplication().NewPropertySet();
    var psOut = TheApplication().NewPropertySet();
    bsSvc.InvokeMethod("Activate", psIn, psOut);

  • This Business Service also has another method 'RestoreActivate', use of which is not known to me yet.

  • I also found out that Application Deployment Manager (ADM) invokes this business service to clear LOV cache after the deployment.

April 3, 2015

EAI - Defining Field Dependencies in Integration Objects

Define dependency between fields by using the user properties of the integration component field. The names of these user properties must start with FieldDependency, and it is recommended that the value of each property contain the name of the field on which the associated field is dependent. The EAI Siebel Adapter processes fields in the order defined by these dependencies, and generates an error if cyclic dependencies exist. 

The EAI Siebel Adapter automatically takes into account the dependencies of the fields set by a PickList on the fields used as constraints in that PickList. For example, if a PickList on field A also sets field B, and is constrained by field C, then this implies dependencies of both A and B on C. As a consequence, the EAI Siebel Adapter sets field C before fields A and B. 

User Property Name: FieldDependency<field_name>
Value: Any active integration component field name within the same integration component 

For the complete list Of Integration Object User Properties, refer to bookshelf.

September 25, 2014

Configuration: How to add/change Screen Tab Icons?


We can add or change Screen Tab Icons by making use of Bitmap Categories.


For example, we need to add Screen Tab Icon for Contacts screen.


1) Create a Bitmap Category:

Name: Contacts

Project: <pick_one>


2) Create a Bitmap

Name: Screen Tab Icon

File Name: contacts_icon.gif


File has to be of type GIF and preferably of size 18x18.

File should be placed in /public/enu/images folder




3) Get the Screen name, query for the screen in Siebel Tools.


4) In Siebel Tools menu, click on View --> Windows --> Properties Window (with screen record highlighted in Objects Edit Window). Pick the Bitmap Category, created in Step 1.




5) Compile the Bitmap Category and Screen objects and you are done!


September 22, 2014

Invoking Business Service from Calculated Field Expression


Recently I came across a requirement where in I had to enable/disable a Button on a Applet if all the given conditions are met. The conditions were not that straight forward, I had to go to different BCs (from different BOs) to check them.

The solution I found was InvokeServiceMethod calculated field expression (not recommended by Siebel though)

SYNTAX: InvokeServiceMethod ("My Business Service", "MyMethod", "inputArg1=" + [Field Name 1] + "," + "inputArg2=" + [Field Name 2], "outputArg")

What I did was,
1. Create a Calculated Field "Enable Button"
2. In Calculated Value I used InvokeServiceMethod, which calls a Business Service (method) with RowId as input and returns Y or N.
3. Used this Calculated Field in Applet User Property "CanInvokeMethod: EnableButton".

How InvokeServiceMethod works?
It invokes given method of a Business Service with Input Arguments, Calculated field refers output argument as its Value.

InvokeServiceMethod ("Enable Button Business Service", "EnableButtonMethod", "RowId=" + [Id], "outEnableButton")

My BS code would look something like this:


if (MethodName == "EnableButtonMethod")
{
  var strRowId = Inputs.GetProperty("RowId");
  var strResult = CheckConditions(strRowId);
  if (strResult == "Y")
  {
    Outputs.SetProperty("outEnableButton", "Y");
  }
  else
  {
    Outputs.SetProperty("outEnableButton", "N");
  }
}


It is not advised to use InvokeServiceMethod if the Calculated Field is exposed in UI. Business Service gets invoked every time you step off a record.