Siebel CRM Desktop for Microsoft Outlook Administration Guide > Customizing Siebel CRM Desktop > Performing Typical Customization Work >

Making a Field in Siebel CRM Desktop Read-Only


To make a field read-only, you must use a file named ctx.form because it includes form controls that are mapped to corresponding fields. To make a field read-only, you disable the corresponding control on the form that references the field that you must make read-only.

In this example, you make the Opportunity Name on the opportunity form read-only.

To make a field in Siebel CRM Desktop read-only

  1. Open the forms_xx.xml file.
  2. Locate the id attribute for the control you must modify.

    In this example, locate the following code:

    <cell size="21">

    <edit id="opportunity" max_chars="100" tab_order="3">

    <field value="string">Name</field>

    </edit>

    </cell>

    This code controls the Opportunity Name dialog box that Siebel CRM Desktop displays on the Opportunity form. It includes the opportunity identifier.

  3. Create a text file named ctx.form.
  4. Add the following code to the file you created in Step 3:

    ctx.form[control_id].enabled = false;

where:

    • control_id is an identifier of the control that you must make read-only.
    • enabled determines if the field is read-only. You can use one of the following values:
      • True. Makes the field editable.
      • False. Makes the field read-only.

        For this example, add the following code:

    ctx.form["opportunity"].enabled = false;

  1. Open the Siebel CRM Desktop client and then navigate to the Opportunity form.
  2. Open an opportunity and make sure you cannot modify the Opportunity Name.
Siebel CRM Desktop for Microsoft Outlook Administration Guide Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.