Tuesday, October 16, 2012

What is Access Control?


Companies business challenge is they should not grant all users access to the entire application, for example:
 Most users should not have access to system administration views
 Most users should not have access to all data in the application, for example
             Employee salaries, sales contracts, and other sensitive data
 Data not related to the employee’s job function 

So, Application administrators require a mechanism to restrict access to views and data
Ideally, the restriction mechanisms should be independent of one another:
 One mechanism to restrict access to views
 A separate mechanism to restrict access to data
And We have the Solution:
Siebel applications provide mechanisms known as Access Control to restrict views and data seen by users
 Responsibilities control access to views
 Positions control access to data
 These Access Control mechanisms are independent of one another

Monday, September 24, 2012

Immediate Post Changes:

Ever wondered what's this Field Property is all about?

The field property "Immediate Post Changes" is used to post the field changes
immediately to the server.

If "Immediate Post Changes" is set to TRUE, PreSetFieldValue event on the server will be triggered.

If "Immediate Post Changes" is set to FALSE, only then PresetFieldValue event on the Browser will be triggered.

For Instance:
Calculated fields are not automatically refreshed when a related field value changes; they are refreshed only after committing the record. To have them refresh immediately after the fields have been changed the Immediate Post Changes property of the field needs to be set to TRUE.

Hope this helps!! 

Wednesday, February 15, 2012

Avoid duplicates using eScript.

To avoid duplication in Contact BC based on First Name and Last Name. If Firstname and LastName already exists then we have to raise a message.

BusComp_PreWriteRecord()
{

var oBO = TheApplication().GetBusObject(“Contact”);

var oBC = oBO.GetBusComp(“Contact”);

With(oBC)

{
SetViewMode(AllView);
ClearToQuery();
SetSearchSpec(“First Name”, this.GetFieldValue(“First Name”));
SetSearchSpec(“Last Name”, this.GetFieldValue("Last Name”));
ExecuteQuery(ForwardOnly);

if (FirstRecord())

{

TheApplication().RaiseErrorText (“Sorry this record exists”);

}
oBC = null;
0BO = null;
return(ContinueOpertion);

}

Compile and test. Please Note :
1. CancelOperation stops the execution of the underlying Siebel code associated with the event.
2. and no need to activate fields as it will be taken care by "SetSearchSpec".

ALSO Please Note:
About ExecuteQuery(ForwardOnly);
Use ForwardOnly Cursor Mode if you will traverse through the record set from FirstRecord using NextRecord and will not return to a previous record. If ForwardOnly cursor mode is not mentioned, it will be defaulted to ForwardBackward and to support this Siebel system has to create a Cache to maintain the entire record which would degrade the performance.

This is particularly true if you perform a look up or if you access a pick list.


Happy eScripting!!!!

Friday, January 6, 2012

Debugging Siebel Applications


It is essential that you understand how to debug Siebel applications. There are four basic techniques:
• Use alerts or RaiseErrorText methods to pop up message boxes
• Write to a file using Trace or custom methods
• Use the Siebel Debugger
• Use object manager level logging

Alert and RaiseError-Text
The alert method in browser script and the RaiseErrorText method in server
script enable you to display message boxes to the user.
The RaiseErrorText method stops the execution of a script; therefore, it is
only appropriate for a quick check of something and is not a good way to
debug scripts where the source of the error is hard to determine.
Alerts do not stop the execution of browser scripts and therefore are a quick
and easy way to debug browser scripts.

Writing to a Text File
The most common way to debug a script is to write information to a text file.
Accomplish this using the Trace function or an Siebel VB or eScript function.
Using Trace, you can write the actual SQL to a file.

Using the Debugger in Siebel Tools
This is a useful tool for visually stepping through the code and looking at the
values of variables real time. You can set break points anywhere until you
isolate a problem.

Using Object Manager Settings
When an application is in production, it is not always possible to add
debugging statements to script. In this situation, developers or systems
administrators can change settings in the object manager to trace events and
SQL.
Defined in the Component Parameters View:
• OM - EL Tracing User Name: a comma separated list of logins to trace (for
example, SADMIN)
• OM - Trace EL Allocation: traces object memory allocation (Set to 1)
• OM - Trace EL Events: traces which events are triggered (Set to 1)
• OM - Trace EL SQL: traces the SQL generated by script (Set to 1)

When to Use Browser versus Server Script


Browser script is recommended for:
• Communication with the user
• Interaction with desktop applications
• Data validation and manipulation limited to the current record

Server script is recommended for:
• Query, insert, update, and delete operations
• Access to data beyond the current record

Preferred alternatives to scripting include::


• Field validation
• User properties
• Workflow
• Personalization
• Run-time events
• State model

Followers

Search This Blog