Troubleshooting Case Number Field No Longer Read-Only

    Symptom

    After removing the case number field from the Cases module editview, the field is not read-only if it is added back to the layout.

    Solution

    To make the case number field read-only,

    1. Edit ‘custom/modules/Cases/metadata/editviewdefs.php’
    2. Change the following line:
      array(
      'name'=>'case_number', 
      'displayParams'=>array('required'=>true)
      )
      

      to:

      array(
      'name'=>'case_number', 
      'type'=>'readonly', 
      'displayParams'=>array('required'=>true)
      )
      
    3. Save the file
    4. Navigate to Admin > Repair > Quick Repair and Rebuild
    5. Uncheck Repair Database
    6. Click Repair

    The case number field should now be read only on the Cases editview

    in Studio and Module Builder

    Reach out to us for help