Siebel – millisecond dates on Applet
by Prachi SharmaI had discussed in my previous posts about invoking a BS in a calculated field for complex calculated calculations, and, about finding out dates accurate to milliseconds. You can read about them from the links below:
Invoking a BS in a calculated field
finding out dates accurate to milliseconds
Today, I will discuss as to how we can show dates on Applets with upto millisecond accuracy. This could be of immense importance in EAI projects as one example, wherein we need to calculate the time spent on each step. Performance debugging could be really enhanced by using this method.
I will extend the concepts introduced previously. We will take the Problem statement to be, “Showing the ‘Created’ time of the Applet, accurate to the closest millisecond”.
For this we would need to create a new custom column of type string in the corresponding table and the Business Component. Whenever a new record is entered in this table, we will populate this new column as well. I will call it “Created_ms”.
I extended the script which I had used in my previous examples like this -
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if (MethodName == “md_getMS_Created”)
{
var d_test01 = new Date();
var d_test03 = d_test01.getMilliseconds();
var d_test02 = d_test01.toString() + ” : ” + d_test03 ;
Outputs.SetProperty ( “out_get_ms_created”, d_test02 );
return (CancelOperation);
}
return (CancelOperation);
}
I have used the methodname, “md_getMS_Created” in this case.
Instead of outputting the value, we can use this script within some other code where we are creating new records. Now, when we expose this column on an Applet, the user will be able to see the time accurate to milliseconds.
I hope this helps somebody some day.
Related posts:
- Siebel – getMilliseconds() usage Siebel by default displays all dates in the system accurate...
- Siebel – Custom Applet Title There is an Applet title on the top of the...
- Siebel – Number of rows displayed in List Applet Siebel Web Client by default shows only the first 7...
- Siebel – InvokeServiceMethod() on Calculated Fields InvokeServiceMethod() is used to invoke Business Services and take values...
- Siebel – Refresh Applet retaining existing context RefreshRecord() does not work in all cases, does it? This...
- Siebel – Fetch Active view properties – III I will discuss a practical example, and the corresponding Inputs...
- Siebel EIM – Nomenclature of Custom Column Previous post regarding new custom columns mapping in EIM table...