Making Sure Users Enter Information in a Field
You can use validation to make sure the user enters information in a field.
To make sure the user enters information in a field
Make sure the form_validator object is defined.
For more information, see Preparing to Use Validation.
Add the following code to the forms.js file:
validator.validate_empty_field(“field_name“,“controlId“,“string_key“,boolean_hi ghlight);
where:
field_name is the name of the field you must examine.
controlId is the name of the control in the form that Siebel CRM Desktop uses to display the field.
string_key is the string key in the resource file that contains the text for the message that Siebel CRM Desktop displays in the client if the validation fails.
boolean_highlight is an optional parameter that determines if Siebel CRM Desktop displays a highlighting box around the control in the client to indicate that the field is required. The default value is true.
For example, the following code makes sure the user enters information in the Opportunity Name field:
validator.validate_empty_field("Name","opportunity","msg_opportunity_name_valid ation");
Test your changes and then republish the customization package.
For more information, see Republishing Customization Packages.