Monday, October 10, 2011

Hierarchical PickList Configuration Step-by-Step!!

 

A hierarchical picklist displays values that are constrained by values selected in another picklist. For example, in the Service Request Detail Applet, the Area and Subarea fields are both picklists that draw their values from the List of values table S_LST_OF_VAL. The items available in the Subarea picklist depend on what the user has selected in the Area picklist.



Hierarchical PickList creation involves of using “PickList Hierarchical” Business Component as the BC for the PickList.

Step 1. :
Create for two LOVs: Here for my example I made the LOVs as SAMPLE_LOV_P acts for the Parent and SAMPLE_LOV for child.

TYPE; Display Value; Language-Independent Code; Parent LIC

SAMPLE_LOV_P 1 1

SAMPLE_LOV_P 2 2

SAMPLE_LOV A A 1

SAMPLE_LOV B B 1

SAMPLE_LOV C C 2

SAMPLE_LOV D D 2



Step 2:
Create two bound PickLists using SAMPLE_LOV_P for Parent and SAMPLE_LOV for Child, pick “PickList Hierarchical” for Business component.

Step 3:
Create two Fields named: Parent Field and Child Field

Modify their Pickmaps as follows:
Parent Field > Pickmap
FIELD :Parent Field PICKLIST FIELD:Value
FIELD :Child Field PICKLIST FIELD: Dummy


 Child Field > Pickmap
 FIELD : Parent Field CONSTRAIN: True PICKLIST FIELD  : Parent

 FIELD : Child Field PICKLIST FIELD : Value
Step 4:
Populate your Fields say “Parent” and “Child” on UI and compile.
Check the results which shows Two Parents 1 and 2 here in our example and
Children {A, B} for Parent 1 and Children {C, D} for Parent 2.
We have now Child Hierarchical PickList which is constrained on Parent Field Value.

Hope this is helpful!!!

Monday, July 25, 2011

Difference between Alert() and SWEAlert Functions

  • In Siebel 2000 and earlier releases, developers could use the application methods such as MsgBox and InputBox to create a dialog box and get input from the users.
  • In Siebel 7, these methods are not supported, but the developer could still achieve the same in browser script with the help of JavaScript functions such as Alert, Prompt and Confirm.
  • Siebel applications version 7.5.3 and higher also includes a method known as SWEAlert method 
The Alert Function and SWEAlert Method:
These functions allow you to display messages and obtain input through browser scripting.

The alert function will pop up a message box and display an OK button.
The syntax is as follows: alert(The Message To Display );

Where as from Siebel applications version 7.5.3 and higher, the Alert function is incorporated into the Siebel interfaces methods through the application SWEAlert method.
and you should use the SWEAlert method rather than the alert function in versions 7.5.3 and higher, unless the script is running in standard interactivity (SI) mode.

PLEASE Note:
The Alert function is only supported in Standard Interactivity mode. 
while the SWEAlert method is only supported in high interactivity mode.

the syntax for SWEAlert method is :
theApplication().SWEAlert("message")

One advantage of using the SWEAlert method instead of the Alert function is the behavior. If the alert is invoked on a popup applet such as an MVG applet. When Alert window displayed using Alert(), the MVG applet disappears behind the main application applet, but it won't when used with SWEAlert().

Saturday, July 23, 2011

RaiseError Method

To Start, RaiseError Method is one of the Application Methods.
The RaiseError method raises a scripting error message to the browser.
When invoked, the RaiseError method causes execution of the script to terminate, and sends a notification to the browser. Therefore, CancelOperation is not required after RaiseError.

Be careful when using RaiseError, because it cancels operations. For example, if it is used
in BusComp_PreWriteRecord, the user or code will not be able to step off the current record until the
condition causing the RaiseError method to be invoked is addressed.

The following eScript example raises the error message “This user-defined test error is used in

PreDelete, as an example for RaiseError Method” when deleting an opportunity with the “Pipeline”
revenue class. Note that the key "user-defined test error1" is predefined as "This user-defined test
error is used in %1, as an example for %2". When the script runs, 'PreDelete' is substituted for %1
and 'Raise Error Method' is substituted for %2.

function BusComp_PreDeleteRecord ()
{
try
       {
var revClass = this.GetFieldValue("Primary Revenue Class");
if (revClass == "1-Pipeline")
   {
TheApplication().RaiseError("user-defined test error1", "PreDelete",
"RaiseError Method" );
      }
else
{
return (ContinueOperation);
}
}
catch (e)
 {
     throw e;
 }
}

Wednesday, May 18, 2011

SQL Query to Get Latest Record

Many times we get this need to find out the Latest Record written to the database.

Well, here is the simple/basic SQL query which works!!

SELECT * FROM SIEBEL.S_ADDR_ORG
WHERE CREATED  = (SELECT MAX(CREATED) FROM SIEBEL.S_ADDR_ORG);

Here CREATED Column  is the created date of the record.



Tuesday, April 12, 2011

Business Component - PreWriteRecord Event

Business Requirement: 
Create an Opportunity and step off the record. An error message should be thrown if the Probablity of the Opportunty is 0% and Sales Cycle is blank.
Solution:

Where to put the code:
@ Business Component level we are writing the code proactively,
as this is validation at record level we decided to put the code at Pre event...

function BusComp_PreWriteRecord ()

{

var prob; // declaring the objects

var sales; //declaration again

prob = this.GetFieldValue("Primary Revenue Win Probability");

sales = this.GetFieldValue("Sales Stage");


if(prob == '0' && sales == '' )

{

TheApplication().RaiseErrorText("Percentage should be greater than 0 and Sales Stage should not be blank");

}

}

Compile and test!!!


BusComp_PreWriteRecord Event : Called before a row is written out to the database.
This event can perform any final validation necessary before any internal record-level validation is performed.
 
CAUTION: Take caution when using the Raise Error and RaiseErrorText methods in
BusComp_PreWriteRecord, because they cancel operations. For example, if RaiseErrorText is used in
BusComp_PreWriteRecord, the user or code will not be able to step off the current record until the
condition causing the RaiseErrorText method to be invoked is addressed.

Friday, April 1, 2011

Enter Siebel License Keys

Once I got into a situation where I needed to enter the license key into the siebel tools and the field where we can enter the License keys is disabled.

Trick for such situation:
1. Open Siebel Tools, (Sample)

2. Now Keep pressing the Shift Key.

3. Open Help Menu -> Technical Support.

4. You see the field "License Keys" enabled

Where you can enter the new keys. Hope this helps.



Wednesday, March 16, 2011

A Service Request cannot be closed without filling in comments in the Summary control.

Before I start about the following post, I would like to extend my deep sympathy towards the Japanese people who are stuck by the disaster and am continuously keeping them in my prayers.

 Requirement : A Service Request cannot be closed without filling in comments in the Summary control. An error message should be thrown "Please enter Summary information before closing the Service Request."


Solution:
We solve this problem by using PreWriteRecord event which is called before a row is written to the database.
The event can perform any final validation necessary before any internal record-level validation is performed.

function BusComp_PreWriteRecord ()

{

 var Status=this.GetFieldValue("Status");

var Abstract=this.GetFieldValue("Abstract");

if (Status == 'Closed')

{

if (Abstract=='')

{

TheApplication().RaiseErrorText("If Status is closed then Summery must be entered");

}

}

}

Thursday, March 10, 2011

Named Method

              Sometimes it is necessary to trigger actions in response to data changes, for example when records are created, deleted, or updated. The response can be required to be triggered before or after the date  change has been applied.
             Within the Siebel Application there is standard functionality, including user properties, to allow you to implement automated responses to data changes without the need to use custom scripts.
for which we have,
The Named Method n applet user property can be used to invoke methods in a certain order.

This user property is supported for applets based on the CSSFrameBase and CSSFrameListBase classes.

Business Challenge:  Update a legacy system with new Account records after a new record is created in the
Siebel application.
Solution :
Goto related applet> applet user property
Create a new record as follows with the properties:
Name :     Named Method 2: WriteRecord


Value :     'INVOKE', 'WriteRecord', 'INVOKESVC', 'Workflow Process Manager', 'Run Process',    '"ProcessName"', '"Account - New Order"', '"RowId"','[Id]'

(make the above syntax using the Expression dialog box, which will be popped when u click on ellipses of the value field)

Note : You can create additional instances of this user property as needed. If you have more than one instance of this user property for a business component, each instance is executed sequentially by number (for example, Named Method 1, then Named Method 2, and so on). If there is only one such user property, then no number is required.

Wednesday, March 9, 2011

Auto Login to Siebel tools,client and server.

The following trick is very useful while working on siebel and needed to login and logout for million times.

Right click on the icon, in properties window, you see Target value something like the following,
"C:\Siebel\8.0\Tools\BIN\siebdev.exe" /c "C:\Siebel\8.0\Tools\bin\enu\tools.cfg"

To automate your login to Sample Database.

add the following
"C:\Siebel\8.0\Tools\BIN\siebdev.exe" /c "C:\Siebel\8.0\Tools\bin\enu\tools.cfg" /u sadmin /p sadmin /d sample

 For Local add:
/u MSMITH /p MSMITH /d Local  (your local username and password)

 /d ServerDataSrc to connect to Server.
 


Saturday, March 5, 2011

Validation Property

Requirement : Action end date should always be greater than action start date.

Solution : BC Field level, set to the syntax of the validation property to

                        >=[Action Start Date]

Should throw an error if the field left empty

Requirement : The field "Date Of Birth" shouldn't be left empty by the user.

Solution: On BC level set the "Required" property to TRUE for the field.

Display Total in List Applet

Requirement : In the Opportunity List Applet, the requiement is to display the total Revenue made by all opportunities.
Solution : Siebel has an out of the box facility for such requirement.
Steps to fulfill this requiement.
In tools Goto Opportunity List Applet > List, make "Total Displayed" and "Total Required" property to TRUE.
Goto the Revenue listcolumn, "Total Required" property to TRUE.

Compile and see the result in the column.

Tuesday, February 15, 2011

Scripting Capabilities

Scripting is commonly used by customers and partners to implement procedural logic or complex business rules within their applications. Customers often have complex business rules pertaining to what are their required fields when a user creates a record. The rule of thumb is always to rely upon configuration to enforce data integrity and entry into a required field wherever and whenever possible. For situations where requirements cannot be met using configuration, developers can turn to Siebel Scripting as an alternative.


1. Business rule definition
2. Perform complex data validations and manipulations
     Which cannot be achieved by declarative configuration
3. Incorporate validations based on internal or external data
     Example: Compare data in different records
4. Dynamic user interaction, for example

  •   Inform user of something
  •   Collect information from user
  •   Custom HTML dialogs
5. Custom behavior definition for user interface controls
     Examples:
  •    Custom menus, buttons, and toolbars
  •    Color coding user interface
 6. Communication with external sources

  •  Desktop applications
  •  Workflow processes
7. Integration solutions
  •  Data transformation
  •  Data sharing
  •  Data transport


Monday, February 14, 2011

Reasons to Avoid Siebel Scripting (music to my ears :))


--Slows processing, Interpreted at runtime

--Introduces potential for data integrity issues and runtime errors

--Requires continued maintenance

--Introduces complexity

--Often reproduces functionality available through configuration

--Complicates upgrade process

Server Scripts vs Browser Scripts:


Server scripts written in eScript and Siebel VB
Interact with database (query, insert, update, delete)
Execute in Object Manager
Limited support for user interaction
Authored in Siebel Tools or in Client
Access to data beyond the current record (validation and manipulation)


Browser scripts written in JavaScript
Interact with users and desktop applications
Download to client and execute in browser
Authored in Siebel Tools
Data validation and manipulation limited to the current record



Thursday, February 10, 2011

Initializing Developer's Local Database

After the Extraction developers must now initialize their local databases. Initialization creates a local database file, called sse_data.dbf and stores it on the developer’s local machine. Siebel Tools includes an initialization program that creates this file.
Steps to initialize a developer’s local database:
1. Open tools put the credentials.
2. Logon and connect to the Local database.

The following message appears:
“The local Siebel database was not found. Would you like to connect to the Siebel Remote server to initialize the local database?”
3. Click Yes.

Siebel Tools connects to the Siebel Remote server and initializes the developer’s local database.
If initialization is successful, the sse_data.dbf file appears in the tools_root\local directory


Performing a Full "Get" Process:

After initializing a local database, you must populate it with a read-only copy of all

the projects and object definitions stored on the server database.
This process is called a full get. A full get is equivalent to checking out all the projects from the
server, however the projects are not locked and you cannot modify the object
definitions until you check out a project from the server database or lock a project
locally.
1.Start Tools , login to Local, tools > Check Out
2. Choose the name of your repository.
3. Select the All Projects radio button.
4. Click the Options button.
5. In the Development Tools Options window, 
 enter Your Server Data Source is pointing to your server development database.
 Your Client Data Source is pointing to the local database you previously
initialized and are currently running against.

These data sources should match those shown in the Control Panel, under ODBC
Data Sources.

6.Close the Development Tools Options
7. In the Check Out dialog box click Get.


After the full get is complete, your currently open local repository has the same
contents as the server repository from which you did the full get.
And now we are ready to check out and do our customization as per the business requirement.

Friday, February 4, 2011

Extracting the Local Database

 1 From the application-level menu, choose View > Site Map > Server Administration > Enterprise Operations.
2 Click the Component Requests tab, and click New.
3 In the Component/Job field, select Database Extract from the pick list.
4 In the Component Request Parameters list, click New and add the necessary parameters.
The required parameter for Database Extract is Client Name.
The value for the Client Name parameter is the name of the mobile Web client say for example MJONES.
5 From the Component Requests menu, select Submit request.
The mobile client database is extracted. This may take 5-10 minutes.

The Database Extract program creates the appropriate directory and its subdirectories for each mobile Web client.
Siebel > docking > MJONES > inbox,outbox
Note : Running the Database Extract task creates a database snapshot for a given user,
which consists of multiple files. These files contain all the data required to initialize
the user’s local client database, and are placed in the directory

serversiebel_srvr_root\docking\user\outbox.

and we are done!!!








Generating a New Database Template

  • A database template is a cached representation of Siebel tables and indexes that are stored in a database file (DBF).
  • You create a database template on the server.
  • Siebel Remote will use the template to create the local database for each developer.
  • You create the database template by running the Generate New Database server component (GenNewDb).
Steps to generate a new database template.

To generate a new database template (GenNewDb) (v7.5.2)

1 From the application level menu, choose View > Site Map >Server Administration >Enterprise Operations.

 2 Click the Component Requests tab.
3 Click New.
4 In the Component/Job field, select Generate New Database.
5 Specify the server name in the Server field.
6 In the Component Request Parameters list, click New.

7 In the Name field, select SQL Anywhere Database from the pick list.
The default value is typically sse_utf8.dbf and appears automatically.
8 From the Components Request menu, select Submit request.
A new database file is generated. This may take a few minutes and the status will show "Success".


Tuesday, February 1, 2011

An error occured executing SQL statement-Siebel:

An error occured executing SQL statement:


When I was trying to access Application's Screen, I was recieving this error. "An error occured executing SQL statement".


Got all the possible reasons. Hope the following post helps.
Possible Reasons and Solutions:

* Invalid column, BC Field without a column, Runtime events are referring to wrong fields etc.

* Spooling by using the command ----> /s "" C:\spool.txt"

run the SQL statement in dbisql and identify the statement that has error associated with it.

Followers

Search This Blog