Siebel CRM Desktop for Microsoft Outlook Administration Guide > Customizing Siebel CRM Desktop > Customizing Field Behavior >
Making Fields Read-Only
To make a field read-only, you disable the corresponding control on the form that references the field that you must make read-only. The example in this topic makes the Opportunity Name field on the opportunity form read-only. To make a field read-only
- Use a JavaScript editor to open the forms.js file.
For more information, see JavaScript Files in the Customization Package.
- Locate the function that is associated with the form you must modify.
For example, to make an item on the Opportunity form read-only, locate the following function:
// OPPORTUNITY FORM SCRIPTS // function opportunity_form(ctx) { }
For more information, see Customizing Form Functions.
- In the function you located in Step 2, locate the following statement:
set_controls_access()
- Add the following code after the statement you located in Step 3:
ctx.form[control_id].enabled = value;
where:
- control_id is the name of the control in the forms_xx.xml file.
- value determines if the field is read-only. You can use one of the following values:
ctx.form["opportunity"].enabled = false;
- The ctx.form file includes form controls that Siebel CRM Desktop maps to corresponding fields. For information about the forms_xx.xml file, see Files That the Customization Package Contains.
- Open the client and then navigate to the Opportunity form.
- Open an opportunity and make sure you cannot modify the Opportunity Name.
- Republish the customization package.
For more information, see Republishing Customization Packages.
|