יום ראשון, 30 בדצמבר 2012

Happy New Year!!

New Year's Day is every man's birthday. 

Cheers to New Year with another chance to get it right.  With Sun settling in and 2k12 memories getting recycled i wish you and your loved ones a very happy and prosperous new year. May you get less bugs and more incentives. I am going for a new assignment and hope it will be on Open UI. 


Resolution or no resolution again wishing you a very bombastic new year.

Happy 2k13!!

יום ראשון, 23 בדצמבר 2012

How to get the Date difference in Days, Hours, Minutes, Seconds




A one liner solution for requirement to find out the date difference between two different dates in eScript:



function
Service_PreInvokeMethod (MethodName, Inputs, Outputs)

{

var Date1 = new
Date("12/22/2012");

var Date2 = new
Date("12/23/2012");



TheApplication().RaiseErrorText(

"Date1 =" +
Date1 +

"\n Date2 =
" + Date2 +

"\n Date
Difference in Days = " + (Date2.getTime() -
Date1

יום שבת, 22 בדצמבר 2012

How to add number of Hours to a Date Field







I am back with a very
basic requirement which might looks very easy, but the solution might not
be that easy to implement.



Requirement:

I have a Service
Request form applet where I have following fields exposed on the UI:



Severity - LOV
field values: a) 1-Critical b) 2-High c) 3-Medium d) 4-Low
Commit Date - Date
Time field


Depending upon the
Severity, being set by the user, system

יום שני, 10 בדצמבר 2012

How to add custom Javascript file to an applet ?

In order to change the look and feel of the applet or UI, we have to add some JavaScript plugins to the applet This is the very first step in siebel open UI customization. Now lets take a look on that.

TO achive this we are using some user properties
Physical_Renderer Lets give its value as MyRenderer

1) Create a new directory called "custom" under the directory
             " D:\<file system>\client\PUBLIC\enu\IB2012_20\SCRIPTS\siebel"
2) Copy your custom js file lets say  "myUI.js" to the following directory
               "D:\<file system>\client\PUBLIC\enu\IB2012_20\SCRIPTS\siebel\custom"


Next step you have to update the manifest file. To do that
Open the file "D:\<file system>\client\OBJECTS\custom_manifest.xml"

Add a new key in the following section,
<PLATFORM_KEY_SPECIFIC><PLATFORM Name="Desktop">:
<KEY Name = "MyRenderer">
<FILE_NAME> siebel/phyrenderer.js </FILE_NAME>
<FILE_NAME> siebel/custom/myUI.js </FILE_NAME>
</KEY>

compile the applet and open the browser & Test your code.
Please remember if you want to see any CSS changes, you may clear your cache.

יום ראשון, 9 בדצמבר 2012

Standard Interactivity or High Interactivity

With winters approaching hibernation starts and efficiency dips (even though its below par through out the year). But still issues never stop. Recently while working on standard interactivity portal we have written script on BC which was used in both HI as well as SI application. However typical business requirement forced us that this piece should be executed only on SI mode of the application and not on the HI mode.

The real trick here is to identify in which mode of application you are working on. With some support from Google we were able to find its-another-mystery-service-type business service which is used extensively but less talked about. "Web Engine State Properties" is the magic service here. Below piece of code can help you find the mode.

var sInputs = TheApplication().NewPropertySet();
var sOutputs = TheApplication().NewPropertySet();
TheApplication().GetService("Web Engine State Properties").InvokeMethod("IsHighInteractive",sInputs,sOutputs);
var sTest = sOutputs.GetProperty("IsHighInteractive");

The key here is the name of the method and name of output argument is same. There are more methods of this BS. All will return either 1 or 0. This BS is primarily used in SWT tags to determine modes, main example being CCStylesChoice.swt where it directs which CSS file to be used for which mode. Any other method to identify application mode is more than welcome in comments section.

Happy Crunching!!





יום שני, 3 בדצמבר 2012