Wednesday, July 16, 2008

Use Default Sensitivity and CaseInsensitive

A TRUE or FALSE value.
For fields of type DTYPE_ID
Queries are case-sensitive if
Use Default Sensitivity is TRUE and
CaseInsensitive setting in the CFG file is FALSE.
Queries are case-insensitive if
Use Default Sensitivity is TRUE and
CaseInsensitive setting is TRUE.
For Id fields not exposed in the business component (such as the ID field in Opportunity), the User Default Security property cannot be set.

Immediate Post Changes

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.

Property Description
A TRUE or FALSE value.
Field data is posted to the server when the focus moves off of the field and then the data is refreshed. Setting this property to TRUE causes an immediate roundtrip to the server.
When set to True the browser script PreSetFieldValue event is bypassed.
Typically used for constrained drop-down lists and calculated fields

How can a MVF be configured to be a required field?

Currently, the standard Siebel application does not provide the ability to make a multi value field “required”.
The solution currently available right now is to write Visual Basic (VB) code to enforce the business requirement.
The Sample VB code to make the Street Address Multi Value Field to be a
required field would be:
Function BusComp_PreWriteRecord As Integer
DIM streetAddress AS String
streetAddress = “”
Me.ActivateField(”Street Address”)
streetAddress = Me.getFieldValue(”Street Address”)
If NOT len(streetAddress) > 0 then
MsgBox “Please Enter Street Address”
BusComp_PreWriteRecord = CancelOperation
exit Function
end if
BusComp_PreWriteRecord = ContinueOperation
End Function

Sort Specification

If two or more applets which are based on same Business Component have require different sort specifications, copying the business component is not required in order to apply the sort specifications individually. The following example snippet in the Applet Load event helps to implement required sort specification with the same business component

Personalization Administration: Applet visibility controlPersonalization Administration could be used to provide additional visibility controls for Ap

Personalization Administration could be used to provide additional visibility controls for Applets and Views.
It is widely known that one could hide an applet in the view from a user with particular Primary Responsibility by using following expression in Administration - Personalization > Applets view using conditional Expression for a given Applet name:
GetProfileAttr(”Primary Responsibility Name”) = <”Responsibility Name”>
There are other supported Profile Attributes, which are lesser know and hardly documented. One of these is ‘GetProfileAttrAsList’.
The following expression could be used in order to compare a value with the user’s responsibilities list and not just the Primary Responsibility.
InList(”ERM Manager”, GetProfileAttrAsList(”User Responsibilities”))
Note that “ERM Manager” is the value for the responsibility you are comparing to.
You can also find some additional postings on Support web regarding these by using “GetProfileAttrList” as the search key word.
Typical application for this information is when configuring Customized/personalized Home Pages for different level of users(Sales Rep, Team Lead, VP/Executives etc).

Call to NextRecord after a call to DeleteRecord

DeleteRecord moves the record pointer automatically to the next record in the record set. The record pointer will move twice if a call to NextRecord is made after a call to DeleteRecord. The consequence is that just every 2nd record will be deleted because a record will be skipped.
So we need to be more cautious while designing such scripts.

Sunday, June 1, 2008

BC UndoRecord – a new learning

BC UndoRecord Method.
Requirement:
If user changes a field value make a flag true
If user hits ESC key or does an undo record then set the flag to false.
Solution:
On SetField value event write the script to make the set the flag as true.Problem:
The problem that we faced was:
If user changes the value the flag is set to true but if user click on Undo Record or hits ESC key then that flag was not being set to false. We explicitly coded in PreInvoke of BC
if (MethodName == “UndoRecord”){ Set the flag to false}
But this code was not firing.
Reason:
BC UndoRecord is only called if user does something which results in ChangeRecord event to fire. In simple words BC UndoRecord is only called if user copies or creates a new record and hits ESC key.
In case user changes a field value and then hits ESC key only Applet Undo Record is called not BC UndoRecord method
Solution:
On Applet write the following script.
if (MethodName == “UndoRecord”){ this.BusComp().InvokeMethod(“UndoRecord”); }