Saturday, August 14, 2010

Date Calculations in eScripting

Date addition and subtraction can be easily done using the following methods of Date Object.

1. setDate() / getDate()
2. setMonth() / getMonth()
3. setYear() / getYear()
4. setFullYear() / getFullYear()

Any Siebel date field can be easily converted to date object using the following date constructor statement. For eg.

var dtOptyDate = new Date(GetFieldValue("Created"));

Now you can use the above mentioned methods on this date object to perform date calculation. 

For example if you want to add an year to the Created Date and update automatically in committed date you can write the script as follows

dtOptyDate.setFullYear(dtOptyDate.getFullYear() + 1)

or alternatively

dtOptyDate.setMonth(dtOptyDate.getMonth() + 12)

Beauty of this it will automatically take care of the Leap year / 30 and 31 days calculations for the respective months etc....

Once you have calculated the date then you need to set the same back in Siebel field as follows

SetFieldValue("Oppty Due Date",  ((dOptyDate.getMonth() + 1) + "/"" + dOptyDate.getDate() + "/" + doptyDate.getFullYear()));

Friday, August 13, 2010

How to add Total in List Applet

Siebel's one of the wonderful option is enabling Total for list applet which solves most of the Reporting requirements.

Follow the 3 simple steps below to add Total to the list applet:

1. In the object explorer of Tools navigate to Applet > List and check the "Total Display" and "Total Required" fields

2. Navigate to List Column and query for the field in which Total has to be created and check the "Total Required" field to enable showing the Total in bottom of the List applet

3. To show the currency in front of the Total provide your expression "Total Currency Code Expression" field like Expr: Parent: 'Opportunity.Currency Code'. 
Normally if you leave this field as blank by default Siebel predefault with $.  For example your opportunity details has 2 line items one in USD and other in some other currency and you wanted to show the currency code as Opportunities currency code then you can use the expression mentioned in the example or you can also default any currency code like Expr: 'YEN'

Wednesday, June 23, 2010

SBL-DBC-00105 - An error has occurred executing a Sql statement

All of a sudden I was getting the error "An error has occurred executing a Sql statement. Please continue or ask your systems administrator to check your application configuration if the problem persists.(SBL-DBC-00105)" in one of EBC based view. I am having trouble in loading only a particular record of the invoice otherwise for the other records I am able to view the data in this EBC based view.  Finally after doing a research in Support web I come to understand the following:


One of the field length mentioned in the EBC and the table associated with EBC has a lesser length when compared to the actual table which resides outside the Siebel schema. Since its a EBC an external application accessing the application has accessed this field and updated with a greater length of data that is mentioned in the Siebel EBC and Table. Hence the above error occured. After correcting the BC field's length and column length and compiled these changes into SRF have resolved the above issue.

Tuesday, April 13, 2010

SBL-EAI-04177: Information about integration component field "Name" not found.

This is one of the interesting error I faced when generating the BIP Reports in Siebel 8.1. The report works fine if I query on the "Agreement Number" field in "All Agreements" view and generate the report from "Reports" menu.  Whereas if I query the same Agreement record against "Name" field and generate the report from "reports" menu it gives me the above error.

After researching the support web I understood the error above indicates that the query which is being passed to the Integration Component uses fields which it does not contain and therefore the query specification cannot be applied. As the query specification is constructed from a combination of elements in the UI it is necesssary to review the PDQ used on the view along with any custom query performed by the user to establish the source of the error. The error message does include details of the problematic fields and the Integration Component in question and this information should aid the developers in making the necessary modifications. As a guideline developers should endeavour to include any fields on which a user may query within the underlying Integration Component definition. Hence after adding the "Name" (Problematic field shown in the error message) has been added to the Integration object and compiled into SRF to resove this issue

Saturday, March 6, 2010

ORA-24345: A Truncation or null fetch error occurred

All of a sudden I was getting the error "ORA-24345: A Truncation or null fetch error occurred" in one of EBC based view. I tried loading the same record by having a different and criteria and made sure that the record is also a part of my query condition. This time I drill down on the record for which it didn't have any problem and then I navigated to the problematic record and the view loaded without any issue but I was not able to see the detail record even though it had few records to be shown. Finally after doing a research in Support web I come to understand the following:
The field length mentioned in the EBC is different from the actual field length mentioned in the Table. Since its a EBC an external application accessing the application has accessed this field and updated with a greater length of data that is mentioned in the BC. Hence the above error occured. After correcting the BC field's length and compiled the EBC into SRF the above issue is resolved.

Thursday, March 4, 2010

Siebel Mobile Web Client Error

The following error may occur when the Mobile Web Client application was launched by loging into local database

The application is in a lock-out mode.(SBL-DCK-52032)

Resolution: Issue resolved after changing the "ConnectString" parameter with local db name in Sample section of application CFG
ConnectString = D:\Siebel8.1\Tools_1\local\sse_data.dbf -q -m -x NONE -gp 4096 -c40m -ch60m

Runtime Error! - EBC

You may often the see below error and the application abrubtly closes when you navigate to a view which has applets using EBC in Siebel Mobile Web Client.

Runtime Error!
Program:
This application has requested the Runtime to terminate it in an unusual way.Please contact the application's support team for more information.

Resolution:

Add the following parameter in your application CFG file along with along with Datasource parameters for EBC this will resolve the issue

DOCKED=TRUE