Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Business Component Events > BusComp_PreSetFieldValue EventThe PreSetFieldValue event is called before a value is pushed down into the business component from the user interface or through a call to SetFieldValue. SyntaxBusComp_PreSetFieldValue(FieldName, FieldValue) ReturnsContinueOperation or CancelOperation UsageThe PreSetFieldValue event is called each time a field is to be changed or populated for a given business component. When using a picklist to populate multiple fields, PreSetFieldValue is fired for each field that is populated. For example, you have an applet that you use to populate Last Name, First Name, and Contact ID. Therefore, PreSetFieldValue fires three times, once for each field. 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. In the preceding example, if your script returns CancelOperation for a field, that field is not populated. However, PreSetVieldValue still fires for the other two fields populated by the picklist. NOTE: To prevent infinite recursions, if the PreSetFieldValue event is running it does not run again for the same business component instance, even if used on a different field in the business component. Used WithExampleThis Siebel VB example uses the PreSetFieldValue event to check if a quote discount is greater than 20 percent, and to take appropriate action if it is. For other examples of BusComp_PreSetFieldValue, read LoginId Method, and ExecuteQuery Method. Function BusComp_PreSetFieldValue (FieldName As String, The following is the equivalent example in Siebel eScript. function BusComp_PreSetFieldValue (FieldName, FieldValue) |
Siebel Object Interfaces Reference |