Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > About Object Interfaces and the Programming Environment > Siebel Object Interface Methods That You Can Use to Control Data and Objects > Methods That Access Data from Business ComponentsThis topic describes the object interface methods that allow your configuration to access and modify data that resides in a Siebel application. A business component can provide data for each field of each business component record, such as the fields of an opportunity. You can use a business component to read data, manipulate data, and then write this data to the Siebel database. You can use a custom script that you write in Siebel VB or Siebel eScript. For example, if you create a script in Siebel VB or Siebel eScript that references the NewRecord event in a business component, then Siebel CRM calls this script. This situation is true if any of the following items calls the event: An event is available only with Siebel VB or Siebel eScript. Adding and Inserting RecordsYou can use Siebel VB or Siebel eScript to mimic one of the following commands in the context of a many-to-many relationship:
You can use one of the following methods to associate a new child record: You can use one of the following methods to create a new record in the child record:
How Siebel CRM Saves a Record to the Siebel DatabaseSiebel CRM saves a record to the Siebel database in the following situations:
Example of Accessing Data from an Existing Business Component InstanceIf Siebel CRM starts an event, then the code in this example calls an object interface method that resides on an existing business component instance. The term instance describes the current, run-time state of an object. For example, a business component instance is a run-time occurrence of a business component. It includes all of the run-time data that the business component currently contains, such as the values for all business component fields and the values for all properties of this business component. For example, an instance of the Contact business component includes the current, run-time value of the City field that resides in this business component, such as San Francisco. You can configure Siebel CRM to get a business component instance, and then modify this data or call the methods that this business component references. In the following example, the VB script resides in the SetFieldValue event of the business component: Sub BusComp_SetFieldValue (FieldName As String) Example of Accessing Data from a New Business Component InstanceThe example in this topic describes how to create a new business object instance and a business component instance. It uses the PreSetFieldValue event of the Opportunity business component. If the user updates the Sales Stage to 07 - Verbal Agreement, then Siebel CRM requires the user to associate a decision maker with the opportunity. Otherwise, Siebel CRM resets it to the previous value. To determine if a vice president or president is associated with the opportunity, Siebel CRM searches the contacts that it associates with the opportunity. The following steps describe the logical flow of object interface methods that Siebel CRM uses to create a new business component instance:
Example of Using Siebel VB to Access Data from a New Business Component InstanceThe following example uses Siebel VB to access data from a new business component instance: Function BusComp_PreSetFieldValue (FieldName As String, FieldValue As String) As Integer Dim RetValue As Integer ' Parent-child relationship is established if Example of Using Siebel eScript to Access Data from a New Business Component InstanceThe following example uses Siebel eScript to access data from a new business component instance: function BusComp_PreSetFieldValue (FieldName, FieldValue) Methods That Get Data From Business ComponentsThe following object interface methods get data from a business component:
|
Siebel Object Interfaces Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |