Siebel Tools Reference > Business Objects Layer > Fields >

Sequence Fields


Situations can occur in which you need to create a field that provides sequential numbering for the parent business component. For example, you may need to number line items in an Order or products in an Opportunity. Sequential numbering is not automatically provided in any system columns in standard tables in Siebel applications. However, you can configure a sequence field in a detail business component by adding a business component user property called Sequence Field and creating a sequence business component with a special business component class called CSSSequence.

The details of configuration of a sequence field appear in Figure 90.

Figure 90.  Sequence Field Configuration Details
Click for full size image

The roles of the object definitions in Figure 90 are as follows:

For an example of sequence field configuration and procedures see Defining Business Objects and Business Components.

Examples of sequence field configuration in standard Siebel applications can be viewed in Siebel Tools. For example, examine the Opportunity Product and Opportunity Product.Line Number (Sequence) business components, which are the numbered detail and sequence business components, respectively.

To add a sequence field to a business component that does not currently have one

NOTE:  Before you begin the procedure, check to see if the class of the detail business component is CSSBCBase. If it is not, you need to contact Siebel Technical Services before going any further.

  1. Verify that the business component to which you want to add a sequence field is the detail business component in a master-detail relationship. This is the numbered detail business component.

    NOTE:  The numbering of detail records will start from 1 within each master record.

  2. Add a child field object definition to the numbered detail business component. Set the Name property value to Line Number, the Type to DTYPE_NUMBER and the column to a numeric extension column such as ATTRIB_14.
  3. Add a child business component user prop object definition to the numbered detail business component. Set the Name property value to Sequence Field, and the Value property to Line Number.
  4. Create a business component. Set the Class property to CSSSequence, the table to the name of the base table of the numbered detail business component, and the Name to xx.Line Number (Sequence), where xx is the name of the numbered detail business component. This is the sequence business component.
  5. Set the Sort Spec of the xx.Line Number (Sequence) business component to Sequence (DESCENDING).
  6. Add a child field object definition to the sequence business component. Specify a Name property value of Sequence, and a column value the same as the extension column specified for the Line Number field in the numbered detail business component.
  7. Add a child field object definition to the sequence business component. This is the foreign key field that establishes the master-detail relationship to the master business component. The Column property should be set to the same column as the corresponding field in the numbered detail business component.
  8. Create a link object definition that establishes a master-detail relationship between the master and sequence business components.
  9. Create a Business Object Component child object definition of the business object or business objects that use the existing link between the master and numbered detail business components. Specify the new link and the sequence business component in the Link and Business Component properties, respectively.
  10. Expose the Line Number field in applets that display records from the numbered detail business component.

 Siebel Tools Reference
 Published: 20 October 2003