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.