Module 29 Business Layer Configuration Existing BCs and Fields

Embed Size (px)

Citation preview

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    1/31

    Siebel 8.0 Essentials

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    2/31

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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    3/31

    Business Layer Configuration: Existing Business Components and Fields 3 of 31

    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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    4/31

    Business Layer Configuration: Existing Business Components and Fields 4 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    5/31

    Business Layer Configuration: Existing Business Components and Fields 5 of 31

    Business ComponentProperties

    1. Properties for Editing

    2. Owner Delete Property

    3. Search Specification Property

    4. Sort Specification Property

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    6/31

    Business Layer Configuration: Existing Business Components and Fields 6 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 appletsreferencing the business component

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

    created

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    7/31Business Layer Configuration: Existing Business Components and Fields 7 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 toFALSE at the business component level

    The most restrictive settings are used

    Affects allapplets

    referencing

    this BC

    Customized

    for the

    applet

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    8/31Business Layer Configuration: Existing Business Components and Fields 8 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 therecord

    Since SADMIN is

    Primary Member, he

    becomes the OWNERof the record and so

    only he can delete the

    record.

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    9/31Business Layer Configuration: Existing Business Components and Fields 9 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    10/31Business Layer Configuration: Existing Business Components and Fields 10 of 31

    Search Specification Expression

    It is the expression stating the conditional statement

    It consists of field names, constants, logical operators, functions andcomparison 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

    Field name

    is in [..]

    Conditional

    Operator

    Logicaloperator

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    11/31Business Layer Configuration: Existing Business Components and Fields 11 of 31

    Search Specification - Considerations

    The search specification property may be at the business componentlevel or at the applet level

    Search Specifications are a part of the WHERE clause for all applets thatrefer 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 anAND in the resulting SQL statement

    Avoid mutually exclusive search specifications since this may preventrecord display

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    12/31Business Layer Configuration: Existing Business Components and Fields 12 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    13/31Business Layer Configuration: Existing Business Components and Fields 13 of 31

    BusComp View Mode

    The BusComp View Mode child object definition specifies that the

    business component is subject to access controlThe 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 Typeproperty

    identifies the

    access control

    mechanism

    Field used to

    specify

    visibility

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    14/31Business Layer Configuration: Existing Business Components and Fields 14 of 31

    BusComp View Mode - Example

    The Service Request BC has an organization-based BusComp ViewMode

    Invoked when user navigates to the All Service Requests view

    Visibility MVField Property is set to Organization so as to readorganizations from Organization MVF to determine record visibility

    Organization-based

    BusComp View

    Mode invoked by

    All views

    The applicationcompares the users

    current organization to

    organizations in the

    Organization MVF

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    15/31Business Layer Configuration: Existing Business Components and Fields 15 of 31

    BusComp View ModeExample

    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

    Personal basedBusComp View Mode

    invoked by My view

    The application

    compares the User

    Owned By Id field and

    if both matches the

    record will be visible

    Sales Rep based

    BusComp View Mode

    invoked by My Teamview

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    16/31Business Layer Configuration: Existing Business Components and Fields 16 of 31

    Field Properties

    Field properties set at the business component level are applicable

    across all applets that reference itEach applet references one, and only one, business component

    Properties set at the

    BC level affect all

    applets referencing

    the BC

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    17/31Business Layer Configuration: Existing Business Components and Fields 17 of 31

    Business Component Field Properties

    Required and Read Only

    Validation

    Default Values

    Calculated Fields

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    18/31Business Layer Configuration: Existing Business Components and Fields 18 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    19/31Business Layer Configuration: Existing Business Components and Fields 19 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

    Used if string

    exists in SRF..

    ..or custom

    string entered

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    20/31

    Business Layer Configuration: Existing Business Components and Fields 20 of 31

    Default Values

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

    recordExample: 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    21/31

    Business Layer Configuration: Existing Business Components and Fields 21 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    22/31

    Business Layer Configuration: Existing Business Components and Fields 22 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    23/31

    Business Layer Configuration: Existing Business Components and Fields 23 of 31

    Calculated Value Property

    It is an expression built from:

    Field names in the same BCField 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    24/31

    Business Layer Configuration: Existing Business Components and Fields 24 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.

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    25/31

    Business Layer Configuration: Existing Business Components and Fields 25 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 valuesentered by the end user

    Solution: Use the BC Read Only Field user property, which allows arecord to become read-only based on values in a particular field

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    26/31

    Business Layer Configuration: Existing Business Components and Fields 26 of 31

    BC Read Only Field Example

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

    value is either Y or NBC Read Only Field user property requires an input value of Y or N

    For this example, a calculated field named BC Read Only Flag iscreated with the expression ([Delete Class Registration]="N")

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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    27/31

    Business Layer Configuration: Existing Business Components and Fields 27 of 31

    BC Read Only Field Example

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

    propertyIn 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

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    28/31

    Business Layer Configuration: Existing Business Components and Fields 28 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 fieldto read only, depending on the Boolean value of Protect InternalEmployee Flag field

    Value property has the name of the field with a Boolean value

    ConditionField

    affected

    The Boolean value

    in this field decidesthe condition

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    29/31

    Business Layer Configuration: Existing Business Components and Fields 29 of 31

    Adding a User Property

    The Name property in the Business Component User Properties childobject 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 aredisplayed in the picklist

    Picklist

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    30/31

    Business Layer Configuration: Existing Business Components and Fields 30 of 31

    Module Highlights

    BC properties capture the required business logic. They are set tocontrol behaviour

    Properties for editing, Owner Delete properties, Search Specification, SortSpecification

    Properties for editing include No Delete, No Insert, No Merge and NoUpdate

    BusComp View Mode specifies that the BC is subject to accesscontrol

    Field properties set at the BC level are applicable across all appletsthat reference it

    Required, Read Only, Validation, Default Value, Calculated Field

    User Properties are used to configure specialized properties for theparent object definition applet, BC, control, field or list column

  • 7/30/2019 Module 29 Business Layer Configuration Existing BCs and Fields

    31/31

    Lab

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

    business components and fields