Siebel Developer's Reference > Business Component User Properties > Controlling Parent and Child Relationships >

Copying and Deleting Child and Grandchild Records


The Deep Copy and Deep Delete user properties copy or delete a record. For example, a deep copy user property can copy the detail records that a child business component contains from the original record to a new record that the parent business component contains. If Siebel CRM uses one of these user properties, then it examines sources according to the following order to determine the parent and child link that it must use:

  1. The parent and child reside in the same business component. The Recursive Link user property that resides in the business component must define the relationship. Siebel CRM uses this link to identify child records. For more information, see Specifying Recursive Links Between Parent and Child Business Components.
  2. The Deep Copy/Delete Link user property is set on the parent business component. Siebel CRM uses the link that the Deep Copy/Delete Link user property specifies. For more information, see Specifying the Link for Deep Copy and Delete.
  3. The parent and child business components are of the same Siebel object, and the parent is the primary business component in the business object. Siebel CRM determines whether a link from the parent to the child exists. If it exists, then Siebel Tools displays it in the Link property in the Business Object Component list.
  4. Step 1, Step 2, or Step 3 do not provide a link between the parent component and the child business component. Siebel CRM determines whether a link named parent business component/child business component exists. For example, Opportunity/Revenue. If this link exists, then Siebel CRM uses it.

Each business component that Siebel CRM modifies during a deep copy uses the configuration that resides on each of these business components. The parent business component includes deep copy properties for each child, and each child business component includes deep copy properties for each grandchild. This configuration is the same for deep delete.

Siebel CRM supports deep copy only for a business component that references the CSSBCBase class and that gets data from this class. The CSSBusComp class resides in the parent of the CSSBCBase class. Siebel CRM does not support deep copy for the CSSBusComp class. You can write a script or a workflow process that uses deep copy with the CSSBusComp class.

You must not use Deep Copy or Deep Copy/Delete Link with the Quote business components or the Order Entry - Orders business component. The copy functionality for these business components uses the Data Transfer Utilities business service. For more information, see Siebel Order Management Infrastructure Guide.

Using Deep Copy to Copy Records in Child Business Components

The Deep Copy n user property specifies a child business component. If a user chooses the Copy option, then Siebel CRM copies the records that this child business component contains. This option typically copies only one level. The Deep Copy n user property copies records in multiple levels, similar to a cascade copy. You typically use Deep Copy and Deep Delete together.

The value for this user property must contain the name of a child business component if you define the parent and child link in one of the ways that the Copying and Deleting Child and Grandchild Records topic describes.

You must not use Deep Copy if the parent-child relationship is a many-to-many (M:M) relationship. Instead, you can set the No Copy property to FALSE in the link that Siebel CRM uses for this parent-child relationship.

You can specify this user property with or without the numeric suffix. For more information, see Numbering Instances of a User Property and Specifying the Link for Deep Copy and Delete.

To use deep copy to copy records in child business components

  1. In the parent business component, create the user properties for each child business component that Siebel CRM must include in the deep copy. Use values from the following table.
    User Property Name
    Value

    Deep Copy 1

    child business component name

    Deep Copy 2

    child business component name

  2. Add a multivalue link in the parent business component for each child business component.
  3. Set the No Copy property of the multivalue link to TRUE.

    This configuration prevents an error that is similar to the following from occurring:

    A Duplicate Record Exists SQL

  4. Create a multivalue field in the parent business component from each child business component.

Using Deep Delete to Delete Records in Child Business Components

The Deep Delete n user property specifies a child business component. The value for this user property must contain the name of a child business component if you define a parent and child link in one of the ways that the Copying and Deleting Child and Grandchild Records topic describes.

If a user chooses the Delete option, then Siebel CRM deletes the records that this child business component contains. This option typically deletes records in only one level. The Deep Delete n user property deletes records in multiple levels, which is similar to a cascade delete. You typically use Deep Copy and Deep Delete together.

To use deep delete, do Using Deep Copy to Copy Records in Child Business Components with the following differences:

  • In Step 1, use Deep Delete 1 and Deep Delete 2 for the names.
  • In Step 3, set the No Delete property of the multivalue link to TRUE.

You can specify this user property with or without the numeric suffix. For more information, see Numbering Instances of a User Property and Specifying the Link for Deep Copy and Delete.

Specifying the Link for Deep Copy and Delete

The Deep Copy/Delete Link Buscomp user property specifies the link that Siebel CRM uses for a deep copy or deep delete of the child business component. It resides in the parent business component. The value for this user property must contain the name of a link that exists between the parent business component and the child business component.

The Link object defines a one-to-many parent and child relationship that exists between these business components. For information about links, see Configuring Siebel Business Applications.

You can configure Siebel CRM to modify the value for this user property, create a new instance of it, or deactivate it.

CAUTION:  If you deactivate a predefined instance of this user property in a production environment, then thoroughly plan and test this configuration to confirm that Siebel CRM no longer copies or deletes child records, and that your configuration does not affect records from other business components that are related to these child records.

Specifying Links for More Than One Business Component

Buscomp is an optional parameter. You use it if you must specify the link for more than one business component. It must identify the business component that Siebel CRM uses as the child in a link where the current business component is the parent. You set the deep copy or deep delete user properties in the parent business component. For example, to configure Siebel CRM to do a deep copy or deep delete of the revenues that Siebel CRM associates with an opportunity, you add the Deep Copy/Delete Link: Revenue user property with a value of Opportunity/Revenue. You add this user property to the Opportunity business component. Opportunity is the parent business component and Revenue is the child business component of the Opportunity/Revenue link.

Siebel Developer's Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.