BusComp_PreWriteRecord Event
Siebel CRM calls the BusComp_PreWriteRecord event before it writes a record to the Siebel database. This method returns ContinueOperation or CancelOperation. For more information, see Caution About Using the Cancel Operation Event Handler.
Format
BusComp_PreWriteRecord
No arguments are available.
Usage
For important caution information, see Caution for Using an Error Method with a Write Record Event in BusComp_WriteRecord Event.
You can use this event to perform any final validation before Siebel CRM performs any predefined internal record-level validation.
Siebel CRM starts the BusComp_PreWriteRecord event only if the user modifies or inserts a field value, or if the user deletes a record. If the user deletes a record, then Siebel CRM calls the BusComp_PreWriteRecord method to delete the implied join that joins any records to the initial record.
Using a Write Record Event with a Multivalue Group
If Siebel CRM associates a multivalue group record that uses a many to many relationship with the business component that calls the association, then it starts the BusComp_PreWriteRecord event and the BusComp_WriteRecord event. It starts these events even if the association does not update any fields in the multivalue group business component or in the calling business component. It runs the BusComp_PreWriteRecord event and the BusComp_WriteRecord event to acknowledge the update to the intersection table.
Used With
Server Script
Examples
The following example calls the BusComp_PreWriteRecord event:
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