Monday 31 March 2014

Enabling debug mode for Siebel Taskflow

Debug mode is very useful in debugging the code that we write and is really helpful in debugging E script. Have you ever came across  debug mode in Siebel task flow . This can be very helpful in checking the values that we pass through task properties and can help us in identifying the error-ed step in the task flow. Enabling the debug mode is very simple. To enable task flow debug mode , modify the client CFG file as follows :  

 Under the [InfraUIFramework] section , add the following line  :                                  EnableRestrictedMenu = TRUE    

After making the changes restart the client and you can see Debug Mode menu enabled under the tools section.



     

Friday 28 March 2014

Increase Display value size for an LOV

Maybe you have created a static picklist in siebel and picklist may be using an LOV for which you have may defined values in the Application. What if you have lengthy LOV value to display? Suppose you have a picklist field reason and this field uses a picklist of type XXXXX and the LOV needs to show a list of values ranging from 30-40. Normally what we do is we create list of values in the application and the for the field reason you create a pick map and in the pick map you specify the field to be reason and the picklist field to be value. The picklist field value hold the Display value and using the pick map a copy operation is done whereby the value from the picklist field is copied to the BC field. Unfortunately we have a limitation and that is the value(Display Value) field in the picklist can store only upto 30 characters and if the the value that we need to store exceeds 30 characters then siebel will store the first 30 characters and the rest is truncated. My reserch ended up in aconclusion that we cannot extennd the size of the value field however i came across a workaround.

Instead of using the Display Value we can use the Description field which has a length of 250. You can enter the values in the description field and then use it to construct the pick map. This time for picklist field reason i have modified the pick map and the picklist field in the pick map was updated to Description. That helped me resolve my requirement.

Thursday 27 March 2014

Escript to get Last Day of Month in Siebel

Recently I came across an interesting requirement. In an applet, user has a date field and we need to check whether the date entered by the user is the last day of the month. If not we have to throw a validation. I was eager researching for some vanilla functionality to meet the requirement but I could not find one. Lastly I resorted to scripting. The approach was simple. Firstly from the date entered we will extract the month and year using getmonth() and  getfullyear() functions and for each month we will hard code the last day to 31 or 30 and when month is Feb we will check whether the year is a leap year or not. If its a leap year then last day is 29 else 28. So for every month we will store the last day n a variable and based on the date enter will return the appropriate last day.I have written a BC function the recieves a date as input and returns the last day of that month. The function was called from the BC Prewrite record and the function returned the last day which help me throw the validation. I am attaching the function and hope it helps


Thursday 13 March 2014

Rounding Off Decimal Issue - While exporting data from siebel to Excel

You all may be aware of the vanilla export functionality in siebel. Using this functionality users can export siebel data to CSV or TXT file. I encountered an issue while exporting data from siebel. In siebel applet we had a field which displayed decimal data upto 5 decimal values. But on the exporting the data the field was rounded off to 2 decimal places and in the CSV file I had rounded off values for the field.

For eg in siebel the field showed value 3.06789 and after export the values was rounded off to 3.07.

After analysis the issue was identified. Export showed this behavior because of the configuration made in Administration-Data->Locale. Here we have a field Number Fractional Digits which was pre-configured to 2. It was changed to 5 which helped me resolved the issue. The change was made for ENU only .If you are using a multi lingual application then you should make the changes accordingly to reflect the desired behavior.



Thursday 6 March 2014

Immediate Commit In Task- Siebel User Property

If you are worked on Siebel TBUI you may have come across the transactional property of a task flow. If a task flow is transactional siebel operations on a BC used in the task flow are not committed to the database immediately. Instead they are committed explicitly using a commit operation in the task flow. Now what if you want to commit immediately on a BC in a transactional task flow. Here is where the Immediate Commit In Task User property comes to play. Create a BC user property with the following syntax:-









Thats it!! You are done now any siebel operation done on that BC is immediately committed to the database.