Thursday, July 29, 2010
JavaScript: Siebel Address Bar
Open your Siebel Application Client (Thin or Dedicated)
Just go the address bar as shown in the picture below.
Type the following code in the Address Bar as shown in the picture
javascript:alert(theApplication().GetProfileAttr("Me.First Name"));
Hit Enter Key
It will return you the First Name of the person logged it.
I guess now you know what I am trying to say.Using this technique you can do whatever is possible through browser scripts. The reason being browser scripts are nothing but JavaScript code and a corresponding JS file is generated for the object on which you write the browser script. So you can directly write the browser script code in the address bar after JavaScript prompt and it will do just like it does in broswer script.
You can even call a business service through this technique provided your CFG contains the entry for that BS.
For example you can write.
javascript:alert(var bo = theApplication().ActiveBusObject(););
This will return you the active bus object and assign it to variable ‘bo’.
This can be real handy if you want to check, weather a particular Profile Attribute has been successfully SET or NOT or in case you want to SET a particular Profile Attribute.
To set a particular Profile Attribute you can write
javascript:alert(theApplication().SetProfileAttr("Test",”TestValue”));
Enjoy
Friday, July 9, 2010
HTML File Creation for Merging Custom Docs in Correspondence Siebel 8.0
- Remove/Rename the Siebel Vanilla, Siebel.HTML File present in folder “siebsrvr/REPORTS”
- Create a New word Document and rename that to “Siebel.HTML File Generation.doc” – This Word document can be placed any where on the server.
- Navigate to the following path
SiteMap > Correspondence > Personal Templates
- Add the Document which was created in Step 2 by clicking the New Record.
- Navigate to “My Correspondence Request” View
- Create a New Record using “Ctrl + N”. Click on the below highlighted to select the Template
- Select the Template which was created in Step 4, and Press OK.
- Go to the Bottom Recipients Applet and create a New Record using Ctrl+N
- This Open a Pick Applet, select any record and press “Add”.
10 . Click on the “Generate” Button, wait until the status of the DocumentStatus changes to “Completed” and GeneratedDocument to “Merged”
- Go to “siebsrvr/REPORTS” and check whether Siebel.HTML is created or not.
- Delete the Document Added in Step 4.
Party Model
The S_PARTY table is the base table for all the party related entities: Person (Contact), User, Employee, Partner User, Account, Division, Organization, Partner Organization, Household, Access Group and User list.Party components have M: M relationships among them. For each party record stored in the S_PARTY table, the value of the PARTY_TYPE_CD column denotes the party type. Along with the party type, extension tables provide the primary differentiation between the different parties.
PARTY DATA MODEL:
PARTY TYPE AND PARTIES:
1)
PARTY => PERSON (CONTACT)
PARTY TYPE => PERSON
E.G:
An employee at the customer company.
An employee at the competitor’s company
Features:
A Person is an individual who is represented by a Person record in the database
Without additional attributes, a Person has no access to your database
The base table (S_PARTY) and extension table (S_CONTACT) that define a contact or person. A person is the simplest representation of an individual in the database
2)
PARTY => USER
PARTY TYPE => PERSON
E.G:
A registered customer on (your) Web site
A self-registered partner user, that is, one who has no position.
Features:
A User is a Person who can log into your database and has a responsibility that defines what application views are accessible.
A self-registered partner on a Siebel partner application has a responsibility, but does not have a position like a full Partner User has.
The base table (S_PARTY) and extension tables that define a user (S_CONTACT and S_USER) form User Data Model. A User is a person with following added qualities
1) The S_USER table contains a login for this user
2) The S_PER_RESP intersection table specifies the responsibility for this user
3) It is possible to promote a contact to a user. For example, adding a User ID value for a person in the All Persons view in the Administration – User screen causes the person to appear as a user in the Users view.
3)
PARTY => EMPLOYEE
PARTY TYPE => PERSON
E.G:
An Employee at your company – An Employee is a User who is associated with a position in a division within your company
Base table (S_PARTY) and the extension tables (S_CONTACT, S_USER, and S_EMP_PER) define employee. This includes internal employees and Partner users.
An Employee is a User with the following added qualities:
1. S_EMP_PER provides employee data for this user.
1. A position defined using the S_POSTN table is typically (but not necessarily) associated with an employee.
2. If the organization to which the position belongs is not a partner organization, then the employee is an internal employee.
3. If the organization is a partner organization, then the employee is a partner user.
4)
PARTY => POSITION
PARTY TYPE => POSITION
E.G:
A job title within (your) company
A job title within the partner company
Base table (S_PARTY) and extension table (S_POSTN)
Features:
Position exist for the purpose of representing reporting relationships
A position within your company is associated with a division and is associated with the organization to which that division belongs.
A position can be associated with one division only.
A position may have a parent position. It may also have child positions
One or more employees can be associated with an internal position, and one or more partner users can be associated with an external position.
An employee or partner user can be associated with more than one position, but only one position is active at any time.
5)
PARTY => ACCOUNT
PARTY TYPE => ORGANIZATION
Account is a company or group of individuals with whom you do business.
An account is typically made up of contacts It can have parent and child accounts.
An account can be promoted to partner organization, but it is not a division, an internal or external organization.
Base Table (S_PARTY) and extension table (S_ORG_EXT) defines Account data Model.
6)
PARTY => DIVISION
PARTY TYPE => ORGANIZATION
Division is an organizational unit within a company such as Manufacturing or Corporate unit.
It can also refer to a group of people operating within a particular company.
Features:
A division exists for the purposes of mapping a company’s physical structure into the Siebel Database and for providing a container for position hierarchies.
A division may have a parent division. It may also have child divisions.
Data cannot be associated directly with a division. (Divisions that are not designated as organizations do not drive visibility.)
Base table (S_PARTY) and extension table (S_ORG_EXT) define division data model along with INT_ORG_FLG=Y (in S_ORG_EXT) table
This flag specifies that division is an internal organization.
NOTE: For Account this flag is set to N
7)
PARTY => ORGANISATION
PARTY TYPE => ORGANISATION
E.G:
An Organizational unit within the company such as Asian organization and
A partner company
Features:
An organization is a division that is designated as an organization.
An organization exists for the purpose of providing a container in which positions can be associated with data.
An organization can be internal or it can be a partner organization.
A division can be associated with only one organization: itself or an ancestor division that is also an organization.
Base Table (S_PARTY) and extension tables (S_ORG_EXT and S_BU) define Organizational data model.
An Organization, sometimes known as a business unit, is also a Division, but has a record in the S_BU table.
Partner Organization Data Model:
The base table and extension tables (S_ORG_EXT, S_BU, and S_ORG_PRTNR) define a Partner Organization.
A Partner Organization is the same as an Organization but the flag PRTNR_FLG in S_ORG_EXT qualifies it as a Partner Organization
PARTY => HOUSEHOLD
PARTY TYPE => HOUSEHOLD
Base table (S_PARTY) and household (S_ORG_GROUP) defines Household.
A group of people, typically a family, who reside at the same residence forms Household
A group of purchasers who live in different residences are also included.
Typically, a household is a group of individual consumers who are economically affiliated and share a common purchasing or service interest.
A household may have any combination of contacts, users, employees, and partner users as members.
An individual can belong to more than one household.
9)
PARTY => USER LIST
PARTY TYPE => USER LIST
Base table (S_PARTY) and extension table (S_USERLIST) defines User list.
E.G:
A support team made up of some internal employees and some partner users.
Features:
A user list is an ad hoc group of people. It may have any combination of contacts, users, employees, and partner users as members
A user list cannot have a parent or children.
10)
PARTY => ACCESS GROUP
PARTY TYPE => ACCESS GROUP
Base table (S_PARTY) and extension table (S_PARTY_GROUP) defines access group
E.G:
Partner IT service providers and business-to-business customer companies that buy networking equipment.
An access group is a group of any combination of parties of type Position, Organization, and User List. That is, it is a group of groups
An access group may have a parent access group. It may also have child access groups.
Parties relation to each other:
Divisions, organizations, and accounts are instances of the Organization party type.
A division, internal or partner, is also an organization if its internal organization flag is TRUE (INT_ORG_FLG = “Y”) and it has an associated S_BU record.
Every division is associated with one organization: either itself or the closest ancestor division that is also an organization.
Every position is associated with a division. The position is then also automatically associated with one organization: the organization with which the division is associated.
Persons (contacts), users, employees, partner users are instances of the Person party type.
Typically, you associate each employee and partner user with one or more positions. The employee or partner user has only one active position at one time. The employee or partner user is automatically associated with one division and one organization at a time—the division and organization associated with the active position.
For purposes of granting visibility to data, associations of parties of type Person with other types of parties are stored using the S_PARTY_PER table. For example, accounts are associated with contacts, users are associated with positions, and so on. A user associated with a position can see data for accounts or opportunities assigned to the position (when this is the active position). Relationships stored in S_PARTY_REL also affect data routing for mobile users.
For purposes of storing ad hoc, informational relationships between parties, such associations are stored using the S_PARTY_REL table. For example, a company and its accounting firm may both be stored as accounts. Assuming that your application provides the capability to define this relationship, it can be stored in the S_PARTY_REL table.
Ad hoc and informational relationships between parties are stored in the table S_PARTY_REL. For example, a company and its accounting firm may both be stored as accounts. The relationship between these two accounts can be stored in the S_PARTY_REL table, assuming that your application has been configured to define these relationships.
Thursday, July 8, 2010
ClientBusinessService - 772 - 8.0 Application User Property
Browser Script [ID 497813.1] | |||||
Modified 08-FEB-2010 Type PROBLEM Status MODERATED |
In this Document
Symptoms
Cause
1. Invoking a server-side business service
2. Browser script not being able to invoke another browser script
Solution
1. Invoking a server-side business service
2. Browser script not being able to invoke another browser script
Platforms: 1-914CU;
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. |
Applies to:
Siebel Tools - Version: 7.7.2 SIA [18325] - Release: V7IBM AIX on POWER Systems (64-bit)
Product Release: V7 (Enterprise)
Version: 7.7.2 [18325] Fin Svcs
Database: Oracle 9.2.0.5.0
Application Server OS: IBM AIX 5L 5.2
Database Server OS: IBM AIX 5L 5.2
Checked for Relevance on 02-Feb-2010
This document was previously published as Siebel SR 38-1776449051.
Symptoms
A customer faced two issues with browser scripting during upgrade from version 7.5.3 to version 7.7.2.1. A browser script seemed not to be able to invoke a server-side business service. The resulting output property set remained empty.
Example :
var psInput = theApplication().NewPropertySet();
var srvService = TheApplication().GetService("RB Refresh Financial Account");
psInput.SetProperty("AccountNumber", this.BusComp().GetFieldValue("Account Number"));
psInput.SetProperty("AccountType", "CA");
psInput.SetProperty("UserID", this.BusComp().GetFieldValue("Customer Number"));
var psOutput = srvService.InvokeMethod("Refresh", psInput);
if (psOutput.GetProperty("ReplyMsg") != "")
...
The statement psOutput.GetProperty("ReplyMsg") always returns nothing.
2. A browser script seemed not to be able to invoke another browser script in the Application object, (general) section, that was referenced by a variable in the "top" object of the browser's domain object hierarchy.
Example:
function Applet_Load ()
{
try
{
var sBgColor = "";
var sLastDate = this.BusComp().GetFieldValue("RB1 Online Trans Date");
if ( (sLastDate.length != 0) && (sLastDate.substring(0, 10) == top.GetCurrentDate()) )
sBgColor ="G";
top.SetOnlineControls(this,sBgColor,"CurrentBalance","CashBalance","Effective");
}
catch (e)
{
alert ("Error Applet_Load (CA) : " + e.toString());
}
}
The function SetOnlineControls is defined as follow in the (declarations) section :
top.SetOnlineControls = SetOnlineControls;
function SetOnlineControls(oApplet, sBgColor)
{
...
}
Cause
1. Invoking a server-side business service
In order to make server-side business services visible to browser scripts, the configuration file must contain a reference to the business service in section [SWE]:ClientBusinessServiceHere,=
It was found that the customer had a gap in the sequence of numbers which made the internal algorithm stop searching for more ClientBusinessService entries.
2. Browser script not being able to invoke another browser script
Research revealed that the browser script in fact did invoke the method in the Application object; however, the called method silently exited due to errors.The following behaviors were observed:
a. In version 7.7.2 SIS, some controls have been renamed; for example, Name became Name5, or Account became Accont2 on the applet where the script should operate on. Therefore the script, which was still searching for the previous names, could not find the controls.
Bug 12-U1WUOY was raised to address the control naming issue.
b. Calling
This happened because SetProperty expects that the color value starts with a hash sign, for example: "#f0f0f0".
Bug 12-TRF8VL was raised to request that the hash sign is not mandatory.
c. Calling
Bug 12-U0U7I9 was raised to request the ability to set the background color of a read-only control.
Solution
1. Invoking a server-side business service
When adding client-side business services to the [SWE] section of the configuration file, ensure that the entries are numbered in a continuous way:ClientBusinessService0 =
ClientBusinessService1 =
ClientBusinessService2 =
etc.
2. Browser script not being able to invoke another browser script
a. Control names changed in version 7.7.2 SIS.Solution: Inspect the control names on the affected applets, and adapt the script to use these control names.
b. Calling
Solution: The color string must start with a hash sign: "#f0f0f0".
c. Calling
Solution: The script can call
Additional keywords: Name5, Account2, Revenue2, City2, HTML color name, BackColor, sequential numbering, continuous numbering, ClientBusinessService
Products
|
seTimeOut - RefreshApplet Browser Script
Wednesday, July 7, 2010
Calculated field and Picklist
Calculated field and Picklist
neel Jul 7, 2010 4:33 PM - Show original item
Today Pankaj Juneja a reader of unleashed is sharing a case study where a Picklist on a calculated field helped him solve a problem.
Many of us know that a calculated field can be made editable by putting a pick list and a pick map to it. I always use to think that what’s the use of Calculated Field by making it editable by showing a pick list when a user really can’t do anything much with it.
Recently I came across a problem in which I used it to save myself from a tricky situation. I was usingS_ORG_EXT_ XM table to build a new entity which is having 1: M relationship with Account. We used most of the ATTRIB columns rather extending table. There was one field where we used LOVs to display Data to user. As per client coding standards, we were supposed to store LIC value in tables and show display values since the Application was supposed to go Multilingual in coming years. Since I was not aware of this standard and I placed an LOV on field based on ATTRIB and stored display value in column.
I was using the below config , which is straightforward :
Picklist config –
When we realized this problem, I was suggested to make it Multilingual by giving Translation Table Nameat column level but I realized that since it’s a reusable table (S_ORG_EXT_XM). Tomorrow someone else can use it for some other entity and if I give Translation table, then that column will be useless for that developer since it won’t accept values other than those LOVs. More over its OOB table so doesn’t wanted to touch it as it might hamper Application upgrade.
I just quickly analyzed that now calculated field can be used here. Here is how it worked for me.
Remove pick list from existing field, place it on calculated field.
A Calculated Field Looking up LIC and having Pick list with 2 Pick Maps.
Now expose the above Calculated Field in Applet rather Actual Field. This will always show Display Value to User and behind the scenes store LIC in table via Pick map. Even Query, Sorting worked fine.
Visitors to this post, also read:
Monday, July 5, 2010
Query and QueryBiDirectional
Query and QueryBiDirectional
neel Jul 5, 2010 7:01 PM - Show original item
This might be a very trivial and known thing for people working in Siebel 8.0 workflowsfrom long time. But I wasted around couple of hours for nothing over this. So, thought of posting it here which might help newbie’s save some time if they happen to stumble over same problem.This post is about Siebel Operation step in Siebel 8.0 workflows.
Everybody knows that Siebel Operation step has been armed with new methods such as Next Record, Previous Record, Upsert etc to make our life easier.
Requirement:
The requirement on which I was working required me to:
- Query Service Request Attachment records related to a Service Request
- Run a loop around it
- Perform some operation in a business service on those records.
So, I created a workflow use Query, Next Record operation to loop through records and had a business service step in which output from query operation was passed and some manipulations were done. Basically
Query SR -> Query SR Attachment -> Run BS -> Next Record -> Query SR Attachment
Problem:
Problem started when the requirement was modified, to update the record after calling the business service. I added an update step in between BS step and Next Record step and workflow stopped looping on records.
Query SR -> Query SR Attachment -> Run BS -> Update Record -> Next Record -> Query SR Attachment
It would exit only after updating the first record.
Solution:
After struggling for around couple of hours (in which I almost created the workflow again) I noticed that there is another method in addition to Query Method “QueryBiDirectional”. Instead of Query operation I used QueryBiDirectional and the problem was solved.
Reason:
Searching bookshelf for this method I found the following line
“If the workflow is traversing active records or if your workflow uses the PreviousRecord operation, query bidirectionally. Otherwise, use the standard Siebel query operation.”
I was neither traversing Active Records nor I was using Previous Records but still I had to use QueryBiDirectional to make my workflow work. I am not sure why this happens but the moral of the post is
Use QueryBiDirectional instead of Query whenever you are going to have an update operation in between Query and Next Record.
If anybody knows, why this happens please do share with us!
Thursday, July 1, 2010
Quick Fill - Requirement
When you open the applet menu, you can see the typical group of four commands.
With the Save as Template command we can save the current record as a Quick Fill Template. These templates are private by default (just as predefined queries are) and can be made public by anyone who has access to the Quick Fill Templates Administration View in the Administration - Application screen.
When an end user chooses the New From Template command, a pick applet opens and displays all available templates. The end users selects one and the data from the template is inserted in a new record. The Apply Template command works in a similar way but updates the existing record instead of creating a new one.
Power users can leverage the CTRL+J keyboard shortcut (New From Last Template) which creates a new record with data from the last used template.
So you want this on your form applet?
It is as simple as creating four new Applet Method Menu Items as described here.
However, I would recommend to use the Compare Objects window to simply copy them over from, say, the Service Request Detail Applet.
It comes rather unexpected, but this is it. Simply copy over the four menu items and compile the applet.
Quick Fill under the hood
When a template is saved, the data is taken from the form applet and copied to the template. This includes all non-empty single value fields. The HTML Sequence property of the applet's controls (aka tab order) specifies the sequence in which the data will be applied to a new or existing record.
We can prevent the copy effect for individual fields which will be different for each record (such as Account etc.) by using the BusComp User Property "Quick Fill Excluded Field: FieldName" on the applet's business component. A field name must be provided after the colon and the value should be set to Y.
Have a nice day
@lex
Friday, June 25, 2010
Google Maps
Saturday, June 19, 2010
Framework
nths (may be an year) back if somebody would have asked me about frameworksand Siebel. Then my answer would have been, “Framework and Siebel are two separate things and don’t go together”.
A comment by “Tiziano and Paolo” changed all that. It started right here, an innocent comment on eScript best practices post published on Siebel unleashed opened the Pandora’s box and introduced us to the world of framework in Siebel. We go to know that a framework called ABS exists and it potentially changes the way we write eScript.
Jason took it to next level by actually confirming the existence of framework and introducing the features of this framework. ABS was bound by IP laws so nothing could be shared technically but it was still an eye opener and a treat to read. Recently Mik picked up the framework baton and started by sharing couple of very useful functions. Then he shared anerror logging framework with some utility function that he he had developed on a T eScript engine. It looked great but sadly, it didn’t work in ST engine.
A discussion about Pro’s and Con’s of various approaches to create framework on Linked In group resulted in opening of more avenues and techniques to lay a foundation of frameworks. Siebel veterans Matt and Andres discussed alternates to method chaining and prototyping and various techniques they had used to create there frameworks.
Finally Matt has given us a full fledged framework working on ST Engine (should work on T with few minor modifications). His framework helps in reducing the amount of code you have to write in Application. Just to show an example:
- Run a business service:
ar bIsValid = oFramework .Service.run("PTSB VCA System Process Service.ValidatePpsn", ["Ppsn"], ["4576554F"]).IsValid
Query a Business Component:
var sFullName = oFramework.BusComp.getRecord("Employee.Employee", TheApplication().LoginId(), ["Full Name"])["Full Name"];
I am going to give it a try very soon and will share my experience. The big question is what other benefits does it have apart from code reduction?? Does it help in improve performance and memory utilization??
Only time will tell…
Related Posts
- Understanding Prototypes
- Siebel escript ABS Framework Summary
- Continue the loop
- Variable declaration best practice?
- Siebel Unleashed Poll Results
- Drilldown through menu item
- A few tricks with setTimeout()