Siebel Object Interfaces Reference > Interfaces Reference > Business Component Methods >

WriteRecord Method


Commits to the database any changes made to the current record.

Syntax

oBusComp.WriteRecord

Argument
Description

Not applicable

 

Returns

Not applicable

Usage

After creating new records and assigning values to fields, call WriteRecord to commit the new record to the database.

Used With

Browser Script, COM Data Control, COM Data Server, Java Data Bean, Mobile Web Client Automation Server, Server Script

Example

This Siebel VB example inserts an activity if the Sales Stage field is set to 02. For other examples, see GetMVGBusComp Method and NewRecord Method.

(general)
(declarations)
Option Explicit

Sub BusComp_SetFieldValue (FieldName As String)
   ' Run this code from the Opportunities Activities view.
   ' Opportunity is presumed to be the parent business component.

   Select Case FieldName
      Case "Sales Stage"
      if Me.GetFieldValue(FieldName) LIKE "02*" Then
         ' reference the Action business component
         Dim oBCact as BusComp
         Set oBCact = me.BusObject.GetBusComp("Action")
         With oBCact
            .NewRecord NewAfter
            .SetFieldValue "Type", "Event"
            .SetFieldValue "Description", "THRU SVB, Stage _
               changed to 02"
            .SetFieldValue "Done", Format(Now(), _
               "mm/dd/yyyy hh:mm:ss")
            .SetFieldValue "Status", "Done"
            .WriteRecord
         End With
         set oBCact = Nothing
      end if
   End Select
End Sub

Siebel Object Interfaces Reference Copyright © 2008, Oracle. All rights reserved.