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

WriteRecord Method

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




Not applicable



Not applicable


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


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.

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"
         End With
         set oBCact = Nothing
      end if
   End Select
End Sub

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