Configuring Siebel eBusiness Applications > Configuring Business Components >

Configuring Data-Driven Read-Only Behavior


Business components and fields can be configured as dynamically accessible, with their read-only status turned on and off depending on the value in a particular field in the current record. This is accomplished using one of the following Business Component object type user properties, depending on the requirement:

  • BC Read Only Field

    Specifies a TRUE or FALSE field in the record that, when TRUE, causes the current record to become read-only.

  • Field Read Only Field: fieldname

    Specifies a TRUE or FALSE test field and a target field in the same business component. When the TRUE/FALSE field is true, the target field becomes read-only.

    NOTE:  FieldName syntax works if FieldName is not a join field. If FieldName is a join field to another table, then this syntax does not prepopulate the field that uses this syntax in its Pre Default Value.

  • Parent Read Only Field

    Specifies a TRUE or FALSE test business component or field combination in the parent chain (parent, grandparent, and so on) that, when TRUE, causes the target business component to become read-only.

For more information about user properties, see Siebel Developer's Reference.

When configuring read-only behavior, consider the following:

  • Wherever a business component or field name is specified, whether in the Name or Value property of the user property object definition, make sure that the capitalization, spelling, and use of blank spaces are correct. Also make sure that quotation marks are not present.
  • These user properties do not function when used in an applet in a view where the view's Admin Mode property is set to TRUE.

    Admin Mode, when TRUE, turns off all insert and update restrictions for the business components used by the view, including those specified by business component user properties. The business component Sales Rep and Personal visibility modes are ignored. Records that do not have a primary team member are also visible. However, pop-up visibility is not overridden.

    NOTE:  The Admin Mode flag should be set to TRUE only in a view that is part of a screen containing all administration views. Do not use the Admin Mode flag for a view in a screen that contains any non-administration views.

    You can have a list view with Admin Mode set to TRUE that drills down to a detail view not marked as an administration view, while remaining in Admin Mode. This allows you to share detail views with non-administration list views.

BC Read-Only Field

This user property specifies a Boolean field that, when TRUE, causes all fields in the current record to become read-only. This also prevents the user from updating or deleting the record, but does not prevent the addition of new records to the business component. The Name and Value properties in the user property record are specified as follows:

  • Name. Contains the literal text BC Read Only Field.
  • Value. Contains the name of a field in the same business component as the parent object definition of the user property. This field must be a TRUE or FALSE field.

An example of the use of BC Read Only Field is the situation in which you need to prevent users from updating inactive accounts. The Inactive Account field in an account record is a TRUE or FALSE field that, when TRUE, indicates that the account is inactive. To configure dynamic read-only behavior for the Account business component based on this field, add a business component user property child object definition to the Account business component, with the following property settings:

  • Name. BC Read-Only Field.
  • Value. Inactive Account.

Field Read Only Field

This user property is similar to BC Read Only Field, in that it tests the field specified in the Value property and enforces a read-only restriction when the test field has a value of TRUE in the current record. However, unlike BC Read Only Field, the Field Read Only Field user property restricts one field in the same business component, rather than the entire business component record.

The Name and Value properties in the user property record are specified as follows:

  • Name. Contains an expression in the following format:

    Field Read Only Field: fieldname

    For example:

    Field Read Only Field: Account Status

    Note that there is only a single space between the colon and the field name.

  • Value. Contains the name of the test field. This is a TRUE or FALSE field in the same business component as the parent object definition of the user property.

One Field Read Only Field user property must be created for each field you want to make conditionally read-only.

An example of the use of Field Read Only Field is the situation in which you want to make the Competitor field in an account record read-only when the Type field has a value of Competitor. In other words, if an account record has been included because that account is a competitor, you do not want users to be specifying that account's competitors. The following procedure describes how to accomplish this.

To restrict the Competitor field in an account based on the account's type

  1. Navigate to the Business Component object type in the Object Explorer, and then to the Account object definition in the Object List Editor.
  2. Create a calculated Boolean field in this business component that will have a value of TRUE when the Type field has a value of Competitor.

    For purposes of the example, the name of this test field can be Competitor Calc, although the name is unimportant as long as it is referenced correctly in the user property.

  3. In the calculation property of the Competitor Calc field, enter the following value:

    IIf([Type] = "Competitor", "Y", "N")

  4. Expand the Business Component object type in the Object Explorer, and select the Business Component User Prop object type. Click the Object List Editor to make it active, and choose Edit > New Record.
  5. Set the following values in the new Business Component User Prop object definition:
    • Name. Field Read Only Field: Competitor
    • Value. Competitor Calc

Parent Read Only Field

This property, like BC Read Only Field, places a read-only restriction on an entire business component, rather than a single target field. This restriction occurs when a TRUE or FALSE test field has a TRUE value. However, unlike BC Read Only Field and Field Read Only Field, this user property is used to place a restriction on a child or grandchild (and so on) business component of the business component containing the test field. In the other user properties, the read-only restriction is placed on the business component containing the test field, or on another field in the same business component.

Parent Read Only Field is used primarily to restrict the detail records in a multi-value group. It could also be used to restrict the detail records in a master-detail view, but in that case you need to make sure that the restricted business component is not also used in the context of some other business object than the intended one.

The Name and Value properties in the user property record are specified as follows:

  • Name. Contains the literal text Parent Read-Only Field.
  • Value. Contains an expression in the following format:

    buscompname.fieldname

    where fieldname is the name of the test field, that is, the TRUE or FALSE field to be evaluated, and buscompname is the name of the business component in which the test field is located. For example:

    Account.Inactive Account

The business component to be conditionally restricted is the one to which you add the user property as a child object definition. The business component containing the test field must be a parent or grandparent of the restricted business component by way of a link or series of link relationships.

An example of the use of this user property is the situation where you want to disable the update of the Account Address multi-value group when the account record has a Type of Competitor. To accomplish this, you add the same calculated field as in the Field Read Only Field example, and then add a user property to the Business Address business component with the following values:

  • Name. Parent Read Only Field
  • Value. Account.Competitor Calc

This causes the Account Address multi-value group to be read-only when the account record is for a competitor.

NOTE:  When using the Parent Read Only Field user property, the test field must have its Link Specification property set to TRUE. Otherwise the dynamic read-only functionality does not work. However, if the child record is displayed in the multi-value field in the parent business component, it is not necessary to have the Link Specification property of the field set to TRUE.

Configuring Siebel eBusiness Applications