Vous êtes sur la page 1sur 31

Siebel 8.

0 Essentials

Module 28: Business Layer Configuration: Existing Business Components and Fields

Module Objectives

To edit Business Component properties in order to capture the

business logic To describe Business Component View Modes To edit field properties To specify business component and field user properties

Business Layer Configuration: Existing Business Components and Fields

3 of 31

Business Component - Properties


The properties of a Business Component capture the business logic

required Some of the properties are:


Properties for editing, such as: No Delete No Insert No Merge No Update Search Specification Sort Specification

Business Layer Configuration: Existing Business Components and Fields

4 of 31

Business Component Properties


1. Properties for Editing 2. Owner Delete Property 3. Search Specification Property 4. Sort Specification Property

Business Layer Configuration: Existing Business Components and Fields

5 of 31

1. Properties for Editing


These include No Delete, No Insert, No Merge and No Update If set at the business component level, they apply to all applets

referencing the business component


Example: Users cannot delete or merge an advanced search entry, once created

Business Layer Configuration: Existing Business Components and Fields

6 of 31

1. Properties for Editing

These properties are available at the applet level as well


If exceptions are to be made at the applet level, set these properties to FALSE at the business component level The most restrictive settings are used

Customized for the applet Affects all applets referencing this BC

Business Layer Configuration: Existing Business Components and Fields

7 of 31

2. Owner Delete Property


If set to TRUE, only the owner of a record can delete it

On a team-based business component, the primary is the owner of the record

Since SADMIN is Primary Member, he becomes the OWNER of the record and so only he can delete the record.

Business Layer Configuration: Existing Business Components and Fields

8 of 31

3. Search Specification Property


Search Specification is used to provide a conditional statement for

retrieval of records by the business component


Typically used when there are multiple business components based on the same table

BC Field

Conditional Statement

Business Layer Configuration: Existing Business Components and Fields

9 of 31

Search Specification Expression


It is the expression stating the conditional statement It consists of field names, constants, logical operators, functions and

comparison operators Example: For a given user, Account retrieves all records where:
Internal Org Flag is not Y or Partner Flag is not N, and, Account Flag is not N
Logical operator

Field name is in [..]

Conditional Operator

Business Layer Configuration: Existing Business Components and Fields

10 of 31

Search Specification - Considerations


The search specification property may be at the business component

level or at the applet level


Search Specifications are a part of the WHERE clause for all applets that refer to a business component Predefined queries may also contribute to the WHERE clause Search Specifications on an applet and those on a BC are combined with an AND in the resulting SQL statement
Avoid mutually exclusive search specifications since this may prevent

record display

Business Layer Configuration: Existing Business Components and Fields

11 of 31

4. Sort Specification Property


Sort Specification determines the order of sort of the retrieved records
Use DESC or DESCENDING to sort that field in reverse order This property can't be set at the applet level Records are sorted by Name, then by Location

Ensure an index exists to support the sort specification

Business Layer Configuration: Existing Business Components and Fields

12 of 31

BusComp View Mode


The BusComp View Mode child object definition specifies that the

business component is subject to access control


The access control mechanism is specified by the Owner Type property
A business component may have multiple access control mechanisms

Supports multiple view modes A record can be associated with different owner types
Owner Type property identifies the access control mechanism

Field used to specify visibility

Business Layer Configuration: Existing Business Components and Fields

13 of 31

BusComp View Mode - Example


The Service Request BC has an organization-based BusComp View

Mode
Invoked when user navigates to the All Service Requests view
Visibility MVField Property is set to Organization so as to read

organizations from Organization MVF to determine record visibility

Organization-based BusComp View Mode invoked by All views

The application compares the users current organization to organizations in the Organization MVF

Business Layer Configuration: Existing Business Components and Fields

14 of 31

BusComp View Mode Example


The Service Request BC has a Personal BusComp View Mode Invoked when user navigates to the My Service Requests view Views display corresponding records by associating View Modes to Views

Sales Rep based BusComp View Mode invoked by My Team view

Personal based BusComp View Mode invoked by My view

The application compares the User Owned By Id field and if both matches the record will be visible

Business Layer Configuration: Existing Business Components and Fields

15 of 31

Field Properties
Field properties set at the business component level are applicable

across all applets that reference it


Each applet references one, and only one, business component

Properties set at the BC level affect all applets referencing the BC

Business Layer Configuration: Existing Business Components and Fields

16 of 31

Business Component Field Properties

Required and Read Only


Validation Default Values Calculated Fields

Business Layer Configuration: Existing Business Components and Fields

17 of 31

Required and Read Only Properties


If Required is TRUE, that field cannot be left blank If Read Only is TRUE, the field value cannot be edited
Service Requests require Status field

Business Layer Configuration: Existing Business Components and Fields

18 of 31

Validation Property
The validation property is used to ensure that the field data is valid Checks the rule when a record is saved It can refer to only business component fields in the same record The rules are expressed as a combination of logical operators,

constants, pre-defined functions and field names

The validation rule

Text displayed when validation fails

..or custom string entered

Used if string exists in SRF..

Business Layer Configuration: Existing Business Components and Fields

19 of 31

Default Values
Pre Default Value automatically assigns a value to a field for a new

record
Example: In Account BC, the field Partner Flag defaults to a value of N for a new record
Post Default Value assigns a value to a field, if not inserted by the

user, before the record is saved to the database

Business Layer Configuration: Existing Business Components and Fields

20 of 31

Calculated Fields
Value for the field is calculated from values of other fields in the same

record of the business component There is no associated column Calculated property needs to be set to TRUE

Business Layer Configuration: Existing Business Components and Fields

21 of 31

Restrictions on Calculated Fields

Calculated Fields are read-only

Values of calculated fields cannot be validated


Sorting on calculated fields is not supported

Business Layer Configuration: Existing Business Components and Fields

22 of 31

Calculated Value Property


It is an expression built from:

Field names in the same BC Field names from the parent BC Current BC must have the child in a detail view Standard functions String, numeric and logical operators

Field name

Standard function

Business Layer Configuration: Existing Business Components and Fields

23 of 31

User Properties
User properties are used to configure specialized properties for the

parent object definition They are added as child object definitions to an applet, BC, control, field or list column Each user property contains its own conditional logic
Can implement specific, custom IF/THEN logic May use a unique syntax
Can be used as an alternative to scripting Examples: BC Read Only Field,

Field Read Only Field, etc.

Business Layer Configuration: Existing Business Components and Fields

24 of 31

BC User Property Scenario


We take the example of BC Read Only Field user property

Scenario: To make a record read-only dynamically, based on values entered by the end user
Solution: Use the BC Read Only Field user property, which allows a record to become read-only based on values in a particular field

Business Layer Configuration: Existing Business Components and Fields

25 of 31

BC Read Only Field Example


In the Order Entry Line Items BC, create a calculated field whose

value is either Y or N
BC Read Only Field user property requires an input value of Y or N
For this example, a calculated field named BC Read Only Flag is

created with the expression ([Delete Class Registration]="N")


This sets the Flag to Y if Delete Class Registration is N, else to N

Business Layer Configuration: Existing Business Components and Fields

26 of 31

BC Read Only Field Example


In the Order Entry Line Items BC, add the BC Read Only Field user

property
In that, set the Value property to BC Read Only Flag. This is the name of the calculated field on the BC When the value of the flag is Y, the record becomes read-only dynamically

Business Layer Configuration: Existing Business Components and Fields

27 of 31

Field Read Only Field User Property


This property is used to set a specific field of a BC as read-only,

instead of the whole record


Example: Field Read Only Field:First Name sets the First Name field

to read only, depending on the Boolean value of Protect Internal Employee Flag field
Value property has the name of the field with a Boolean value

Condition

Field affected

The Boolean value in this field decides the condition

Business Layer Configuration: Existing Business Components and Fields

28 of 31

Adding a User Property


The Name property in the Business Component User Properties child

object definition has a picklist


A new user property is added by picking a value from the picklist Only those user properties that are allowed for the parent BC are displayed in the picklist

Picklist

Business Layer Configuration: Existing Business Components and Fields

29 of 31

Module Highlights
BC properties capture the required business logic. They are set to

control behaviour
Properties for editing, Owner Delete properties, Search Specification, Sort Specification Properties for editing include No Delete, No Insert, No Merge and No Update
BusComp View Mode specifies that the BC is subject to access

control Field properties set at the BC level are applicable across all applets that reference it
Required, Read Only, Validation, Default Value, Calculated Field
User Properties are used to configure specialized properties for the

parent object definition applet, BC, control, field or list column

Business Layer Configuration: Existing Business Components and Fields

30 of 31

Lab
In the lab, you will: Incorporate business logic into the application by configuring properties of business components and fields

Business Layer Configuration: Existing Business Components and Fields

31 of 31

Vous aimerez peut-être aussi