Siebel Object Interfaces Reference > Interfaces Reference > Business Component Events >

BusComp_PreWriteRecord


The PreWriteRecord event is called before a row is written out to the database. The event may perform any final validation necessary before the actual save occurs.

Syntax

BusComp_PreWriteRecord

Argument
Description
Not applicable
 

Returns

ContinueOperation or CancelOperation

Usage

CancelOperation stops the execution of the underlying Siebel code associated with the event. However, if there is code in the same script following CancelOperation, that code runs regardless of the CancelOperation.

The PreWriteRecord event triggers only if a field value was modified or inserted.

Used With

Server Script

Example

Function BusComp_PreWriteRecord As Integer

   ' This code resets the probability before the write
   ' if necessary

   if Me.GetFieldValue("Sales Stage") LIKE "07*" then
      ' Resets the Probability to 75 if less than 75
      if Val(Me.GetFieldValue("Rep %")) < 75 then
         Me.SetFieldValue "Rep %", "75"
      end If
   end if

   BusComp_PreWriteRecord = ContinueOperation
End Function


 Siebel Object Interfaces Reference 
 Published: 18 June 2003